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

https://github.com/ert78gb/jasmine4-typescript-commonjs-example

Example repo of how to use Jasmine with Typescript in commonjs project
https://github.com/ert78gb/jasmine4-typescript-commonjs-example

Last synced: 7 months ago
JSON representation

Example repo of how to use Jasmine with Typescript in commonjs project

Awesome Lists containing this project

README

        

This is an example project that represents how to set up a Node.js commonjs project with
[Jasmine@4](https://github.com/jasmine/jasmine-npm) for [TypeScript](https://github.com/microsoft/TypeScript).

Key steps:
- add `@types/jasmine`, `@types/node` and `ts-node` to the dev dependencies `$ npm i --save-dev @types/jasmine ts-node @types/node`
- set `"type": "commonjs"` in the `package.json`
- create a [jasmine helper](jasmine-typescript-helper.js) that call `ts-node/register`
- register the helper in the `jasmine.json` config file