https://github.com/hugodf/node-test-runner-examples
Examples of tests using the `node:test` module and runner
https://github.com/hugodf/node-test-runner-examples
node-test-runner nodejs
Last synced: about 1 month ago
JSON representation
Examples of tests using the `node:test` module and runner
- Host: GitHub
- URL: https://github.com/hugodf/node-test-runner-examples
- Owner: HugoDF
- License: mit
- Created: 2024-01-12T09:19:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-05T14:10:46.000Z (9 months ago)
- Last Synced: 2025-03-17T06:51:20.095Z (about 1 month ago)
- Topics: node-test-runner, nodejs
- Language: JavaScript
- Homepage: https://codewithhugo.com/tags/nodetest
- Size: 290 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node Test Runner Examples
Examples are ported to `node:test` and `node:assert` from [jest-handbook-examples](https://github.com/HugoDF/jest-handbook-examples) (which is using Jest).
## Requirements
- Node LTS
- npm## Setup
1. Clone the repository
2. Run `npm install` to install required dependencies.## npm scripts
- `npm run test` will run the core test suite
- `npm run test:all` will run all the test commands
- `npm run test:seq` will run the core test suite with 1 concurrency
- `npm run test:par` will run the core test suite with 5 concurrency
- `npm run test:only` will run the `.only.js` test suite (demonstrating how to use `.only`)
- `npm run test:failing` will run test suites with failing tests
- `npm run lint` will run `biome lint` on example tests
- `npm run format` will run `biome format` on examples tests.## LICENSE
Code is licensed under the [MIT License](./LICENSE).