Unit testing using Jasmine and TypeScript

Here’s (in my opinion) the best way to test a ts-node app as of 2018: npm install –save-dev typescript jasmine @types/jasmine ts-node In package.json: { “scripts”: { “test”: “ts-node node_modules/jasmine/bin/jasmine” } } In jasmine.json change file pattern to *.ts “spec_files”: [“**/*[sS]pec.ts”], In your spec files: import “jasmine”; import something from “../src/something”; describe(“something”, () => { … Read more