1.0.5 • Published 2 years ago
jasminenodets v1.0.5
jasmine-ts
A simplification for running jasmine with ts-node.
Installation
npm i -D jasmine-tsUsage
In your
package.jsonfile create a test script:{ "scripts": { "test": "jasmine-ts \"path/to/specs/**/*.spec.ts\"" } }Initialize jasmine
npx jasmine-ts initRun the tests
npm test
Running with istanbul coverage
You can use nyc to check your test coverage.
Example package.json:
{
"scripts": {
"test": "nyc -r lcov -e .ts -x \"*.spec.ts\" jasmine-ts \"path/to/specs/**/*.spec.ts\""
}
}Note
You still need to install the typings for jasmine to make the typescript-compiler happy about your specs:
TypeScript 2:
npm i -D @types/jasmineTypeScript 1:
typings i -DG dt~jasmineSince 0.1.3 ts-node options are passed through to ts-node.
1.0.5
2 years ago