A simplification for running jasmine with ts-node.
npm install git+https://github.com/yavin5/jasmine-ts --save-dev
-
In your
package.json
file create a test script:{ "scripts": { "test": "jasmine-ts 'path/to/specs/**/*.spec.ts'" } }
-
Initialize jasmine
node_modules/.bin/jasmine-ts init
Note: This module enables the configuration support of reporters. For example, if you want to use the jasmine-spec-reporter, you can add a reporters array to the
jasmine.json
file like this:{ "reporters": [ { "name": "jasmine-spec-reporter#SpecReporter", "options": { "displayStacktrace": "all" } } ] }
If the reporters are not the default export of the module, you can reference another export by using the
#
separator. -
Run the tests
npm test