Typorithm · easy

bun test

bun-testbuntestingwatchrunner
Saved on this device
Full lesson · 8 learning steps Open any exercise for focused practice
1

Step 1 of 8 · intro card

Learn bun test

0%

bun CLI

bun test is a built-in, Jest-like runner with no config: run the whole suite, add --watch for live re-runs, or pass a file path to run just one test file.

Bun ships its own test runner, so bun test works out of the box with no Jest or Vitest install and no config file.

The API is Jest-compatible — describe, test, and expect all work — and TypeScript test files run directly.

bun test --watch re-runs on save, and bun test ./foo.test.ts narrows the run to a single file.

01

bun test runs the whole suite, zero config.

02

--watch re-runs tests as files change.

03

Pass a path to run one test file.

bun test
bun test --watch
bun test ./foo.test.ts

Read the implementation

Connect each part of the code to the concept before you type.

1. Run all tests

bun test discovers and runs every *.test.ts file with the built-in, zero-config runner.

bun test

2. Watch mode

--watch re-runs affected tests automatically whenever a file changes.

bun test --watch

3. Single file

Passing a path runs only that test file instead of the whole suite.

bun test ./foo.test.ts

A complete learning loop

01

Understand

Read the concept map and follow the code breakdown.

02

Reconstruct

Type the implementation, repair mistakes and work through every recall exercise.

03

Verify

Use the final check without hints; revisit weak concepts in short practice sessions.

bun test: Lesson & Practice · Typorithm | ApplyDjinn