npm install chai mocha ts-node @types/chai @types/mocha --save-dev
export const helloTest(){
return true;
}import { helloTest } from '../src/hello-test';
import { expect } from 'chai';
import 'mocha';
describe('First test', () => {
it('should return true', () => {
const result = helloTest();
expect(result).to.equal(true);
});
});"scripts": {
"test": "mocha -r ts-node/register tests/**/*.spec.ts"
},npm run test
Sign up for our newsletter to stay up to date.
We care about the protection of your data. Read our Privacy Policy.
Schopenhauerstr. 71
80807 München
max@42coders.com
+49 (0)176 / 724 306 82
© 2025 42coders All rights reserved.