https://github.com/syniol/modern-nodejs-testing
This is an implementation of running and assertion using Node.js's built-in test runner for TypeScript
https://github.com/syniol/modern-nodejs-testing
Last synced: about 1 year ago
JSON representation
This is an implementation of running and assertion using Node.js's built-in test runner for TypeScript
- Host: GitHub
- URL: https://github.com/syniol/modern-nodejs-testing
- Owner: syniol
- Created: 2025-06-06T15:16:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T15:50:27.000Z (about 1 year ago)
- Last Synced: 2025-06-06T16:30:02.121Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Modern Node.js Testing
Showcasing node.js native test runner with TypeScript. There is an example test file for a ValueObject `Money`. You can find
the logic inside `money.ts` and test cases are places at `money.test.ts`. In recent version of Node.js there is a native extension
to run TypeScript files but in this repository we will be using [TSX package](https://tsx.is) recommended by [Node.js Blog](https://nodejs.org/en/learn/typescript/run).
This allows us to use TypeScript in node.js versions before `20.x`.
## Up and Running
It's simple to run the test, ensure packages are installed `npm i` and then run the tests with `npm test`.
#### Credits
Author: [Hadi Tajallaei](mailto:hadi@syniol.com)
Copyright © 2025 Syniol Limited. All rights reserved.