Skip to content

Commit

Permalink
Update tests to use Promise syntax (typicode#507)
Browse files Browse the repository at this point in the history
* Use promises in tests

* Fix lint

* Update tests

* Update babelrc

* Update config

* Update engines
  • Loading branch information
typicode authored Mar 31, 2017
1 parent 77cd462 commit fdf74e0
Show file tree
Hide file tree
Showing 6 changed files with 255 additions and 287 deletions.
7 changes: 6 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"presets": [
["es2015", { "loose": true }]
["env", {
"targets": {
"node": 4
},
"exclude": ["transform-regenerator"]
}]
]
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@
"yargs": "^6.0.0"
},
"devDependencies": {
"babel-cli": "^6.10.1",
"babel-preset-es2015": "^6.16.0",
"babel-cli": "^6.24.0",
"babel-preset-env": "^1.3.2",
"babel-register": "^6.16.3",
"cross-env": "^2.0.1",
"husky": "^0.13.0",
"markdown-toc": "^0.13.0",
"mkdirp": "^0.5.1",
"mocha": "^3.1.2",
"mocha": "^3.2.0",
"os-tmpdir": "^1.0.1",
"pkg-ok": "^1.0.1",
"rimraf": "^2.5.2",
"server-ready": "^0.3.1",
"standard": "^8.3.0",
"supertest": "^2.0.0",
"supertest": "^3.0.0",
"temp-write": "^2.1.0"
},
"scripts": {
"test": "npm run test:cli && npm run test:server && standard",
"test:cli": "npm run build && cross-env NODE_ENV=test mocha test/cli/*.js",
"test:server": "cross-env NODE_ENV=test mocha test/server/*.js",
"start": "babel-node src/cli/bin",
"prepush": "npm t",
"precommit": "npm test",
"build": "babel src -d lib --copy-files",
"toc": "markdown-toc -i README.md",
"prepublish": "npm run build && pkg-ok"
Expand Down Expand Up @@ -89,6 +89,6 @@
}
},
"engines": {
"node": ">= 0.12"
"node": ">= 4"
}
}
4 changes: 2 additions & 2 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--compilers js:babel-register
--require babel-register
--reporter spec
--timeout 5000
--timeout 5000
Loading

0 comments on commit fdf74e0

Please sign in to comment.