Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding instructions

  • Loading branch information...
commit ded1bd0ff3e298dabb3eb4b3868ae0648dc5fbff 1 parent b9f590c
@rmurphey rmurphey authored
Showing with 29 additions and 2 deletions.
  1. +24 −0 help.txt
  2. +5 −2 server/server.js
View
24 help.txt
@@ -0,0 +1,24 @@
+To work on the tests, open a browser and visit http://localhost:{{port}}. Then,
+edit the tests in the files in the tests/app directory, reloading your browser
+to see whether the tests are passing.
+
+Each test will look something like this:
+
+ it("you should be able to return a truthy value", function() {
+ // define a function for fn so that the following will pass
+ expect(fn()).to.be.ok();
+ });
+
+In the case of the above test, you'd need to define a value for fn (by default,
+fn is a function that does nothing):
+
+ it("you should be able to return a truthy value", function() {
+ // define a function for fn so that the following will pass
+ fn = function() {
+ return true;
+ };
+ expect(fn()).to.be.ok();
+ });
+
+For some tests, the instructions will be more involved; in those cases, the
+inline comments should give you the details you need.
View
7 server/server.js
@@ -22,7 +22,10 @@ module.exports = function(opts) {
fs.createReadStream(opts.baseDir + 'tests/runner.html').pipe(res);
});
- // Actually listen
site.listen(opts.port);
- console.log("Serving at http://localhost:" + opts.port);
+
+ fs.readFile(opts.baseDir + 'help.txt', 'utf-8', function(err, f) {
+ console.log(f.replace('{{port}}', opts.port));
+ console.log("\n\nServing at http://localhost:" + opts.port);
+ });
};
Please sign in to comment.
Something went wrong with that request. Please try again.