Last active
June 7, 2017 01:04
-
-
Save bmorelli25/6aa97f447b6ac842eb6e0b35fc0cd7ed to your computer and use it in GitHub Desktop.
Mocha Test Answer
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
// Require the built in 'assertion' library | |
var assert = require('assert'); | |
// Create a test suite (group) called Math | |
describe('Math', function() { | |
// Test One: A string explanation of what we're testing | |
it('should test if 3*3 = 9', function(){ | |
// Our actual test: 3*3 SHOULD EQUAL 9 | |
assert.equal(9, 3*3); | |
}); | |
// Test Two: A string explanation of what we're testing | |
it('should test if (3-4)*8 = -8', function(){ | |
// Our actual test: (3-4)*8 SHOULD EQUAL -8 | |
assert.equal(-8, (3-4)*8); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment