Created
February 2, 2015 19:24
-
-
Save necccc/29a36782a57b22f15968 to your computer and use it in GitHub Desktop.
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
// npm install mocha sinon chai | |
// test.js | |
var assert = require('chai').assert; | |
var sinon = require('sinon'); | |
var mymodule = require('./mymodule'); | |
suite('mymodule', function () { | |
setup(function () { | |
//... | |
}); | |
teardown(function () { | |
//... | |
}); | |
test('something', function () { | |
var somevalue = mymodule(); | |
sinon.assert.match(somevalue, sinon.match.array) | |
}); | |
}); | |
// mocha --ui tdd test.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment