Andrey Kucherenko
Creator and curator of training platform for developers - https://startupemulator.com/. Math.random() community leader - https://t.me/mathrandomcommunity Engineer with more than 21 years of experience in IT.
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
describe('Calculator',
function () {
it('should summarize two numbers',
function () {
}
);
}
);
describe('Calculator', function () {
it('should summarize two numbers',
function () {
sut.sum(1, 2).should.equal(3);
}
);
});
> mocha test/*.spec.js
․
0 passing (4ms)
1 failing
1) String Calculator "before each" hook:
ReferenceError: Calculator is not defined
at Context.<anonymous> (/home/apk/workspace/lab/tdd/test/Calculator.spec.js:5:15)
at callFn (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runnable.js:223:21)
at Hook.Runnable.run (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runnable.js:216:7)
at next (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runner.js:258:10)
at Object._onImmediate (/home/apk/workspace/lab/tdd/node_modules/mocha/lib/runner.js:275:5)
at processImmediate [as _immediateCallback] (timers.js:330:15)
Unit tests coverage
Increases assurance of correctness
More complete explorations of requirements
Improved code
Code as documentation
Safe refactoring
grunt-mutation-testing
coverage-blamer
GIVEN...
WHEN...
THEN...
By Andrey Kucherenko
Creator and curator of training platform for developers - https://startupemulator.com/. Math.random() community leader - https://t.me/mathrandomcommunity Engineer with more than 21 years of experience in IT.