Skip to content

Commit afd41ea

Browse files
authored
each unit parts must be tested
For completeness of the test cases we could add tests for the read method. So every method can have individual test cases.
1 parent b9d5335 commit afd41ea

File tree

1 file changed

+5
-0
lines changed
  • 1-js/04-object-basics/04-object-methods/7-calculator/_js.view

1 file changed

+5
-0
lines changed

1-js/04-object-basics/04-object-methods/7-calculator/_js.view/test.js

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ describe("calculator", function() {
1515
afterEach(function() {
1616
prompt.restore();
1717
});
18+
19+
it('the read get two values and saves them as object properties', function () {
20+
assert.equal(calculator.a, 2);
21+
assert.equal(calculator.b, 3);
22+
});
1823

1924
it("the sum is 5", function() {
2025
assert.equal(calculator.sum(), 5);

0 commit comments

Comments
 (0)