Some experimental work around use of the Jest test framwork.
See the offical Jest documentation here.
- Install with
npm install --save-dev jest
- Create or update
package.json
to set up test script by adding
{
"scripts": {
"test": "jest"
}
}
- clone the repo locally
- Run
npm install
to install dependencies - Run tests with
npm test
To set up a local Node Web Server
- Run
npm install serve
- Run
serve
- Stop a running server with
ctrl-c