individual test case for methods
to ensure completeness, every method should have their own individual test case.
This commit is contained in:
parent
eb3b360dc3
commit
09f8ca8659
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue