CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

bdd-bun-test

BDD-first testing with bun:test in this repository — scenario-oriented examples, describe/it layout rules, library-integration testing, and no Cucumber. Use when writing or changing tests, adding fixtures, mocking libraries, or when the user mentions BDD, TDD, bun:test, or Vitest.

Quality

88%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is bdd-bun-test in williamrjribeiro/bun-agentic-starter

SKILL.md
Quality
Evals
Security

BDD and bun:test

Prefer BDD: concrete examples of desired behaviour first, then implement until they pass. Same red → green → refactor rhythm as TDD, oriented around user-facing outcomes.

  • BDD — scenarios and outcomes from the outside
  • TDD — isolated units/edges inside an implementation
  • Use both when helpful. No Cucumber/Gherkin runners — use bun:test / bun test
  • Refactor is required after green: clean structure while tests lock behaviour
  • Component tests use bun:test (not Vitest). Mocks: Bun’s Vitest-compatible APIs from bun:test

Test files

  • describe / it from bun:test (not test). Table-drive with describe.each / it.each
  • At least one root describe; all declarations (constants, fixtures, helpers) live inside it
  • Module load must be side-effect free (imports only at top level)
  • Expensive/async setup: beforeAll / beforeEach inside the relevant describe
  • Shared helpers: test/support/ modules that export functions, not eagerly computed values

Testing library code

  • Assert our behaviour; do not re-test a library’s full edge matrix — a few happy paths plus one or two errors for the integration are enough
  • Prefer the real library; mock only when slow or networked
  • Before relying on a library, read source/tests under repos/
  • Library bugs → record them in the project docs (version, repro, expected vs actual), not ever-growing local coverage of the dependency

See also: repo-conventions.

Repository

williamrjribeiro/resume

Path

.agents/skills/bdd-bun-test/SKILL.md

Last updated
First committed

Canonical home

williamrjribeiro/bun-agentic-starter
In sync

since Oct 27, 2026

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.