-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing unit tests for our add and subtract libs
- Loading branch information
1 parent
7680bb4
commit 8436053
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var assert = require('assert'), | ||
add = require('../../lib/add'); | ||
|
||
exports.it_should_add_two_numbers = function(done){ | ||
var result = add(1,1); | ||
assert.ok(result === 2); | ||
return done(); | ||
}; | ||
|
||
exports.it_should_add_two_negative_numbers = function(done){ | ||
var result = add(-2,-2); | ||
assert.ok(result === -4); | ||
return done(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var assert = require('assert'), | ||
subtract = require('../../lib/subtract'); | ||
|
||
exports.it_should_subtract_two_numbers = function(done){ | ||
var result = subtract(5,4); | ||
assert.ok(result === 1); | ||
return done(); | ||
}; | ||
|
||
exports.it_should_subtract_two_negative_numbers = function(done){ | ||
var result = subtract(-4,-2); | ||
assert.ok(result === -2); | ||
return done(); | ||
}; |