Skip to content

Commit 55562b4

Browse files
committed
Add subtraction tests
1 parent 2b6fac3 commit 55562b4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/calculator_spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ describe('Calculator Tests', function() {
1515
});
1616
});
1717

18+
describe('Subtraction Tests', function() {
19+
it('returns 2 - 1 = 1', function(done) {
20+
assert.equal(calc.add(2, 1), 1);
21+
done();
22+
});
23+
24+
it('returns 1 - -1 = 2', function(done) {
25+
assert.equal(calc.subtract(1, -1), 2);
26+
done();
27+
});
28+
});
29+
1830
describe('Multiplication Tests', function() {
1931
it('returns 2 * 2 = 4', function(done) {
2032
assert.equal(calc.multiply(2, 2), 4);

0 commit comments

Comments
 (0)