Skip to content
Agentmart
Submit a tool

node-native-tests

I use node:test + borp + c8, not Jest or Vitest.

Skill by mateonunez

IndexedMIT★ 8
Write a review

Chalk Labs

Need help deploying node-native-tests?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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/mateonunez-node-native-tests

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

I use node:test + borp + c8, not Jest or Vitest. The runtime ships a test runner — I use it. Use when adding tests, when an agent reaches for Jest/Vitest, when configuring coverage, or when user says "add a test", "test runner", or "borp".

Use cases: testing, agent-building

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/node-native-tests

What's inside

Skill name
node-native-tests
Description
I use node:test + borp + c8, not Jest or Vitest. The runtime ships a test runner — I use it. Use when adding tests, when an agent reaches for Jest/Vitest, when configuring coverage, or when user says "add a test", "test runner", or "borp".
License
MIT
Instructions
95 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Node-native tests

The Node.js runtime ships a test runner. I use it. No `jest`, no `vitest`, no `@types/jest`. The runner is `borp` (TAP reporter, parallel by default), coverage is `c8`.

This is a [`single-tool-per-job`](../single-tool-per-job/SKILL.md) choice: the standard library covers it, so no third-party test framework earns its place in `package.json`. The full `ait` testing setup — Docker test services, c8 invocation, package-mirroring `test/` directory — is documented at [`personal/ait/references/best-practices-testing.md`](../../personal/ait/references/best-practices-testing.md).

## When this skill is active

You are about to:

- Add a test file
- Configure a test runner or coverage tool
- Migrate from another test framework (only if I asked for it)
- Reach for `jest.mock`, `vi.mock`, or `@types/jest`

## The setup

```jsonc
// package.json
{
  "scripts": {
    "test": "borp",
    "test:coverage": "c8 borp -T --reporter spec"
  },
  "devDependencies": {
    "borp": "^0.x",
    "c8": "^10.x"
  }
}
```

In monorepos with Docker-backed test infra (PostgreSQL, Qdrant, Redis), pre/post hooks bring services up and down:

```jsonc
{
  "scripts": {
    "test":     "pnpm run:recursive test",
    "pretest":  "pnpm start:services:test",
    "posttest": "pnpm stop:services:test"
  }
}
```

```typescript
// src/foo.spec.ts
import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { foo } from './foo.ts';

describe('foo', () => {
  it('returns ok for valid input', () => {
    const r = foo('valid');
    assert.equal(r.ok, true);
  });

  it('returns err with __type for invalid input', () => {
    const r = foo('');
    assert.equal(r.ok, false);
    if (!r.ok) assert.equal(r.error.__type, 'empty-input');
  });
});
```

File suffix is `.spec.ts` (or `.spec.js`). `borp` picks them up by default.

## Mocking

`node:test` ships `mock` from `node:test`:

```typescript
import { describe, it, mock } from 'node:test';

const fn = mock.fn(() => 42);
fn();
assert.equal(fn.mock.callCount(), 1);
```

For module-level mocks, prefer dependency injection over runtime patching. If you really need module mocking, `mock.module` is in Node 22+.

## Anti-patterns

- **Reaching for Jest or Vitest.** Don't. The runtime has a runner. If something is missing, name what — usually it isn't.
- **`@types/jest` in `devDependencies`.** That's the migration tell. Remove it.
- **`vi.mock`, `jest.mock`, `jest.fn()`** in new code. Use `mock.fn` from `node:test`.
- **`*.test.ts` instead of `*.spec.ts`.** Pick one. I use `.spec.ts`. Keep the codebase consistent.
- **Adding `tsx` or `ts-node` as a test dependency** when `node --experimental-strip-types` (Node 22.6+) or native TS support (Node 23.6+) handles it.
- **Test files importing from `./dist/`.** Test the source, not the build.

## When the codebase already has Jest or Vitest

Stop. Don't migrate unprompted. If there are 50 Jest tests, a silent rewrite is hostile. Note the existing setup, propose a migration as a separate task, and write new tests in the existing style for now. If I confirm the migration, do it in one commit with no other changes.

The exception: brand-new packages added to an existing monorepo can use `node:test` even if other packages use Jest. Each package owns its own test setup.

From mateonunez/skills, MIT.

More from mateonunez/skills

Signals

Stars
8
Forks
0
Open issues
0
Last commit (this folder)
May 7, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from mateonunez

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get node-native-tests running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying node-native-tests?

CallGet help
Cite this page

node-native-tests skill. Agent Mart. https://agentmart.dev/skills/mateonunez-node-native-tests (last updated 2026-10-24)