Skip to content

Commit

Permalink
[update] Test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nhunzaker committed Jan 26, 2015
1 parent 778c002 commit 5f148b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/invariant-test.js
@@ -0,0 +1,17 @@
describe('invariant', function() {
let invariant = require('../invariant')

it ('throws an error if a condition is false', function(done) {
try {
invariant(false, 'message')
} catch(x) {
x.should.be.instanceof(Error)
done()
}
})

it ('does not throw an error if the condition is true', function() {
invariant(true, 'message')
})

})

0 comments on commit 5f148b9

Please sign in to comment.