Created
August 25, 2015 11:06
-
-
Save thraxil/3d56624d1570f9507b81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var requirejs = require('requirejs'); | |
var jsdom = require('mocha-jsdom'); | |
var assert = require('assert'); | |
requirejs.config(require('../../config/test_config').options); | |
describe('models/user', function() { | |
jsdom(); | |
// local operations on a model should be fast | |
this.slow(1); | |
// obnoxious setup to get mocha and require.js to play | |
// well together. | |
var user; | |
beforeEach(function(done) { | |
requirejs(['models/user'], function(_Module) { | |
user = _Module; | |
done(); | |
}) | |
}); | |
describe('instantiate', function() { | |
it('should be possible to instantiate a user', function() { | |
var u = new user(); | |
assert(typeof u !== undefined); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typeof
returns a string, so line 26 should beassert(typeof u !== 'undefined');