An open API service indexing awesome lists of open source software.

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

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.