JavaScript unit testing skeleton
- Clone this repo
- Make sure you have the Node.js installed
- Run
npm install
to install dependencies - Run tests in watch mode with
npm test
Any files with a .test.js
extension inside src/
will be run by Karma.
If you aren't familiar with Jasmine, have a look at the docs
Use the following template for writing the tests:
describe('what are you testing?', () => {
it('should do a specific behaviour', () => {
const expected = 'expected result';
const actual = 'actual result';
expect(actual).toEqual(expected);
});
});