Test runner. Mocha.js
Test runner - фреймворк, основная функция которого - это инициализация тестовой среды и запуск тестов.
Самым популярным среди таких фреймворков является Mocha
describe('Test module name', () => {
before(() => {
// block in which some functionality would be executed
// prior all tests in current describe block
});
beforeEach(() => {
// block in which some functionality would be executed
// prior each test in current describe block
});
afterEach(() => {
// block in which some functionality would be executed
// after each test in current describe block
});
after(() => {
// block in which some functionality would be executed
// after all tests in current describe block
});
it('Some test here', () => {
console.log('first test');
});
});
Last updated
Was this helpful?