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.
This commit is contained in:
Mustafa Kemal Tuna 2021-01-12 05:22:25 +03:00 committed by GitHub
parent b9d5335b1d
commit afd41eaf86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);