snippetbashTip
bun test — Run tests using Bun's built-in test runner. It is a fast, Jest-compatible test runner that looks for
Viewed 0 times
bun testcommandrunbunclitestsusingbuilt
Problem
How to use the
bun test command: Run tests using Bun's built-in test runner. It is a fast, Jest-compatible test runner that looks for *.test.ts (and similar) files. More information: <https://bun.com/docs/test>.Solution
bun test — Run tests using Bun's built-in test runner. It is a fast, Jest-compatible test runner that looks for *.test.ts (and similar) files. More information: <https://bun.com/docs/test>.Run all test files found in the project:
bun testRun a specific test file or directory:
bun test {{path/to/file.test.ts}}Run tests in "watch" mode (re-runs automatically on file changes):
bun test --watchRun tests and generate a code coverage report:
bun test --coverageCode Snippets
Run all test files found in the project
bun testRun a specific test file or directory
bun test {{path/to/file.test.ts}}Run tests in "watch" mode (re-runs automatically on file changes)
bun test --watchRun tests and generate a code coverage report
bun test --coverageContext
tldr-pages: common/bun test
Revisions (0)
No revisions yet.