Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info

This commit is contained in:
Ilya Kantor 2021-01-13 20:01:23 +03:00
commit 4307531f03
3 changed files with 11 additions and 1 deletions

View file

@ -15,6 +15,11 @@ describe("calculator", function() {
afterEach(function() {
prompt.restore();
});
it('the read get two values and saves them as object properties', function () {
assert.equal(calculator.a, 2);
assert.equal(calculator.b, 3);
});
it("the sum is 5", function() {
assert.equal(calculator.sum(), 5);

View file

@ -10,6 +10,11 @@ describe("calculator", function() {
calculator = new Calculator();
calculator.read();
});
it("the read method asks for two values using prompt and remembers them in object properties", function() {
assert.equal(calculator.a, 2);
assert.equal(calculator.b, 3);
});
it("when 2 and 3 are entered, the sum is 5", function() {
assert.equal(calculator.sum(), 5);