Skip to content

Commit

Permalink
add: + debug tips for test files
Browse files Browse the repository at this point in the history
  • Loading branch information
xtx1130 committed Oct 16, 2017
1 parent 5b23290 commit f877ac2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/cross-env NODE_ENV=travis node ./test/test.js",
"debug": "nodemon ./test/test.js",
"debug": "./node_modules/.bin/cross-env NODE_ENV=debug nodemon ./test/test.js",
"cov": "./node_modules/.bin/cross-env NODE_ENV=travis ./node_modules/.bin/babel-node ./node_modules/.bin/babel-istanbul cover ./test/test.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions test/mockserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ router.get('/testkoax2',async (ctx,next)=>{
koa.use(koabody());
koa.use(router.routes());
let mockserver = koa.listen('8012');
console.log('mock server start at 8012');

exports = module.exports = mockserver;
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ exports.test = module.exports.test = callback => {
app.use(koax.middleware());
app.use(approuter.routes());
let server = app.listen('8011');
console.log('test server start at 8011');
let testrp = await rp({
url:'http://localhost:8011/test',
method:'GET'
Expand Down

0 comments on commit f877ac2

Please sign in to comment.