Skip to content
Agentmart
Submit a tool

testing-logging

Provides testing strategies and logging patterns for Node.js/TypeScript and React applications, covering structured logging with pino, unit/integration…

Skill by N43-Studio

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/n43-studio-testing-logging

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Provides testing strategies and logging patterns for Node.js/TypeScript and React applications, covering structured logging with pino, unit/integration testing with Vitest, and React component testing with Testing Library. Use when writing tests, setting up logging, or establishing testing patterns.

Use cases: frontend, testing, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/testing-logging

What's inside

Skill name
testing-logging
Description
Provides testing strategies and logging patterns for Node.js/TypeScript and React applications, covering structured logging with pino, unit/integration testing with Vitest, and React component testing with Testing Library. Use when writing tests, setting up logging, or establishing testing patterns.
License
MIT
Instructions
85 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • reference.md

SKILL.md (first lines)

# Testing & Logging Best Practices

## Quick Start

### Structured Logging (pino)

```typescript
import pino from "pino"

export const logger = pino({
  level: process.env.LOG_LEVEL || "info",
  transport:
    process.env.NODE_ENV === "development"
      ? { target: "pino-pretty" }
      : undefined,
})

// Usage
logger.info({ port: 3000, env: "production" }, "Server started")
logger.error({ error, context: "riskyOperation" }, "Operation failed")
```

### Log Levels

| Level   | When to Use                        |
| ------- | ---------------------------------- |
| `error` | Errors needing immediate attention |
| `warn`  | Potential issues, deprecated usage |
| `info`  | High-level application flow        |
| `debug` | Detailed diagnostic information    |

### Testing Pyramid

| Layer             | Percentage | What to Test                               |
| ----------------- | ---------- | ------------------------------------------ |
| Unit (70%)        | ms         | Pure functions, validators, business logic |
| Integration (20%) | seconds    | API endpoints, database ops, service layer |
| E2E (10%)         | minutes    | Critical user journeys only                |

### Unit Tests (Vitest)

```typescript
import { describe, expect, it } from "vitest"

describe("formatDate", () => {
  it("formats ISO date to readable string", () => {
    expect(formatDate("2025-01-22T10:00:00Z")).toBe("January 22, 2025")
  })
})
```

### React Component Tests

```tsx
import { render, screen } from "@testing-library/react"
import userEvent from "@testing-library/user-event"

it("calls onClick when clicked", async () => {
  const onClick = vi.fn()
  render(<Button onClick={onClick}>Click</Button>)
  await userEvent.click(screen.getByRole("button"))
  expect(onClick).toHaveBeenCalledOnce()
})
```

### Query Priority (prefer top)

1. `getByRole` — Accessible name (best)
2. `getByLabelText` — Form labels
3. `getByText` — Text content
4. `getByTestId` — Last resort

### Test Commands

```bash
pnpm test              # All tests
pnpm test:watch        # Watch mode
pnpm test:coverage     # With coverage
```

## Additional Resources

- For complete patterns including mocking, integration tests, providers, and coverage config, see [reference.md](reference.md)

From N43-Studio/n43-cursor, MIT.

More from N43-Studio/n43-cursor

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Feb 10, 2026 (8 months ago)
Last release
Mar 19, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from N43-Studio

Cite this page

testing-logging skill. Agent Mart. https://agentmart.dev/skills/n43-studio-testing-logging (last updated 2026-10-24)