Created
August 11, 2011 15:23
-
-
Save redsquirrel/1139929 to your computer and use it in GitHub Desktop.
put this in a directory called 'spec' and then run 'jasmine-node spec/'
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
var fs = require("fs"); | |
console.log("about to read, yo!"); | |
describe("your mom", function() { | |
it("is fun to talk about her", function() { | |
fs.readFile("spec/foo-spec.js", function(error, buffer) { | |
console.log("Here's the file!"); | |
console.log(buffer); | |
asyncSpecDone(); // comment this out, and it will hang... cuz it's waiting | |
}); | |
asyncSpecWait(); // comment this out, and node will merrily exit without firing the callback | |
}) | |
}) | |
console.log("exiting, yo!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment