Created
October 25, 2013 03:50
-
-
Save jcreamer898/7149206 to your computer and use it in GitHub Desktop.
Example of unit test issues in AMD
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
define([ | |
'app/viewModels/user' | |
], function(User) { | |
var SomeViewModel = function() { | |
this.users = []; | |
this.addUser(); | |
}; | |
SomeViewModel.prototype.addUser = function() { | |
// Sometimes I wan't to fake this `User` or whatever. It's hard to do w/ AMD. | |
this.users.push(new User()); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment