-
-
Save thejohnfreeman/2394947 to your computer and use it in GitHub Desktop.
Mocha vs Node
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
#!/usr/bin/env mocha | |
/* Change "mocha" to "node" in the first line, and it works. */ | |
var requirejs = require("requirejs"); | |
var one = requirejs("./one"); | |
console.log(one); |
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
define(function () { | |
console.log("loading one"); | |
return "one"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment