To use this playground in your machine, clone and install the repository:
git clone git@github.com:dtgoitia/rxjs-playground.git
cd rx-playground
npm ci
You can access a remote container from your browser. This is a good option if you don't want to install anything in your machine.
To do so, use GitPod to spin-up a container for free for you. Once the container is loaded, the tests will automatically run in watch mode.
Add your files under src/
and ensure your files containing tests end up with .spec.ts
. Otherwise, Jasmine will not pick them up.
Run the tests in watch-mode:
npm run test-watch
Run the tests only once:
npm test
Being in watch-mode:
- type
rs
and press ENTER to run the test suit again. - press Ctrl + C to exit watch mode
Jasmine allows you to use the old console.log
, console.dir
.
Configuration files:
- Nodemon:
nodemon.json
- Node TS:
tsconfig.json
- Jasmine:
spec/support/jasmine.json
Actual setup:
nodemon
is configured to use executejasmine-ts
.jasmine-ts
will by default pick Jasmine's JavaScript configuration (not changed).jasmine-ts
will usenode-ts
.
Jasmine is set up to use reporters for a cleaner test output.