Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 34 additions and 5 deletions.
  1. +24 −0 help.txt
  2. +5 −3 package.json
  3. +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
8 package.json
@@ -2,7 +2,7 @@
"author": "Rebecca Murphey <rmurphey@gmail.com> (http://rmurphey.com)",
"name": "js-assessment",
"description": "A test-driven assessment of JavaScript skills",
- "version": "0.0.0",
+ "version": "0.1.0",
"homepage": "http://rmurphey.com",
"repository": {
"type": "git",
@@ -12,9 +12,7 @@
"node": "~0.6.8"
},
"dependencies": {
- "q" : "0.8.x",
"express" : "2.5.x",
- "request" : "2.9.x",
"underscore" : "1.3.x"
},
"devDependencies": {
@@ -23,5 +21,9 @@
},
"scripts": {
"start": "node bin/serve"
+ },
+ "bin" : "bin/serve",
+ "bugs" : {
+ "url" : "https://github.com/rmurphey/js-assessment/issues"
}
}
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);
+ });
};

No commit comments for this range

Something went wrong with that request. Please try again.