{ assert.equal(1, factorial(0)); }); test('equals 1 for sets of length one ', function() { assert.equal(1, factorial(1)); }); test('equals 2 for sets of length two ', function() { assert.equal(2, factorial(2)); }); test('equals 6 for sets of length three ', function() { assert.equal(6, factorial(3)); });
especificação que então impulsiona o nosso desenvolvimento de software. Comportamento e especificações pode parecer muito semelhante aos testes, mas a diferença é muito sutil e importante. https://joshldavis.com/2013/05/27/difference-between-tdd-and-bdd/
together ') .when('I enter "1"') .and('I add "2"') .then('I should get "3"') .scenario('should be able to add 3 numbers together ') .when('I enter "1"') .and('I add "2"') .and('I add "3"') .then('I should get "6"')