This repository relates to the article "Jest with Angular" - written on my blog (blog.skarby.info).
It was also used as base for a presentation given at ngAarhus on October 30th, 2018.
This project was generated with Angular CLI version 6.1.2.
To start the application, or run scripts, there's no need to install any global dependencies. Make sure you're running a fairly
new version of node
(eg. a LTS-release - this was developed using 8.x), and install the dependencies through npm install
.
- To execute the application (in development mode), simply run the command:
npm start
- To execute the tests (once), simply run the command:
npm test
- To execute the tests (in watch mode), simply run the command:
npm run test:watch
This repository is used for presentation purposes, you back skip ahead (or travel backwards) using the following tags. See the tag names and description below.
Tag name | Description | Direct link |
---|---|---|
v1 | Initial state of application (testing using jasmine) | TBD |
v2 | Code-base, stripped from all jasmine dependencies | TBD |
v3 | Jest added, configuration adjustments made | TBD |
v4 | Adjustments made to tests (createSpyObj) | TBD |
v5 | Snapshot testing | TBD |
NOTICE: To checkout a tag, use the command git checkout <tag name>
(eg. git checkout v1
).