Last active
August 29, 2015 14:03
-
-
Save dbernar1/dece736fa5f9bc062f9e to your computer and use it in GitHub Desktop.
If internal details of a commonJS module were to be unit tested...
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
thereAreNo = ( items_in_array ) -> | |
items_in_array.length == 0 | |
module.tests.thereAreNo: () -> | |
assert thereAreNo [] | |
assert.fail thereAreNo [ 1 ] | |
assert.throws -> | |
thereAreNo 1 | |
, /is not an array/ | |
module.exports = class Life | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment