Created
September 21, 2015 04:22
-
-
Save ParthDesai/4c4da060d64e49700085 to your computer and use it in GitHub Desktop.
A sample test using mocha and chai. To execute, add it into your directory and make sure file name contains a string "test".
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
'use strict'; | |
var chai = require('chai'); | |
var expect = chai.expect; | |
describe('Array', function() { | |
describe('#indexOf()', function () { | |
it('should return -1 when the value is not present', function () { | |
expect([1,2,3].indexOf(5)).to.equal(-1); | |
expect([1,2,3].indexOf(0)).to.equal(-1); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment