The execution

As you always should, you will begin with a templated test file designed to verify that the unit testing framework is configured correctly:

import { expect } from 'chai';

describe('Test Framework', () => {
it('is configured correctly', () => {
expect(1).to.equal(0);
}
}

We have shown a failing version of this template. Before you begin writing the tests that are actually for the kata, run the test:watch NPM script and verify that the test fails. Also, verify that it fails for the right reason. It should fail because 1 was expected but 0 was the actual result. After the test properly fails, change the zero to a one and verify that the test now passes. As long as these two validations work correctly, we will continue and begin working through the code kata.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.81.48