Skip to content

Commit

Permalink
Testing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexyoung committed Jun 10, 2016
1 parent 7426bea commit 9774237
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ch04-what-is-a-node-web-app/tldr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"author": "Alex R. Young",
"license": "MIT",
"dependencies": {
"body-parser": "^1.12.4",
"express": "^4.12.4",
"node-readability": "^1.0.1",
"sqlite3": "^3.0.8"
"body-parser": "1.12.4",
"express": "4.12.4",
"node-readability": "1.0.1",
"sqlite3": "3.0.8"
},
"devDependencies": {
"mocha": "^2.2.5",
"supertest": "^1.0.1"
"mocha": "2.2.5",
"supertest": "1.0.1"
}
}
5 changes: 5 additions & 0 deletions ch10-testing/debug-example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const debugViews = require('debug')('debug-example:views');
const debugModels = require('debug')('debug-example:models');

debugViews('Example view message');
debugModels('Example model message');
15 changes: 15 additions & 0 deletions ch10-testing/debug-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "debug-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"debug": "2.2.0"
}
}
5 changes: 5 additions & 0 deletions ch10-testing/debug-stacktraces/async.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = () => {
setTimeout(() => {
throw new Error();
})
};
1 change: 1 addition & 0 deletions ch10-testing/debug-stacktraces/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./async.js')();
16 changes: 16 additions & 0 deletions ch10-testing/debug-stacktraces/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "debug-stacktraces",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"clarify": "1.0.5",
"trace": "2.3.0"
}
}

0 comments on commit 9774237

Please sign in to comment.