Skip to content

Commit

Permalink
Require Node.js 8.9.4
Browse files Browse the repository at this point in the history
* Remove support for `--debug` and `--debug-brk` CLI flags
* Refactor to utilize object rest/spread and async/await
  • Loading branch information
novemberborn committed Apr 20, 2019
1 parent 2704b16 commit 3a4afc6
Show file tree
Hide file tree
Showing 36 changed files with 511 additions and 586 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Expand Up @@ -6,7 +6,6 @@ node_js:
- 11
- 10
- 8
- 6
env:
- FRESH_DEPS=false
- FRESH_DEPS=true
Expand All @@ -16,13 +15,9 @@ matrix:
env: FRESH_DEPS=true
- node_js: 8
env: FRESH_DEPS=true
- node_js: 6
env: FRESH_DEPS=true
- node_js: 10
env: FRESH_DEPS=true # Assume any bugs that occur with fresh dependencies are not platform specific.
os: windows
- node_js: 6
os: windows # npm install --global currently fails on Windows. Skip the tests entirely instead.
cache: npm
before_install: if [[ "$(npm -v)" != "6.9.0" ]] && [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then npm install --global npm@6.9.0; fi
install: npm ci
Expand Down
33 changes: 16 additions & 17 deletions bench/run.js
Expand Up @@ -100,29 +100,28 @@ for (let i = 0; i < 11; i++) {

const results = {};

Promise.each(combined, definition => {
Promise.each(combined, async definition => {
const {args} = definition;

return runTests(args).then(result => {
const key = result.args.join(' ');
const passedOrFaild = result.err ? 'failed' : 'passed';
const seconds = result.time / 1000;
const result = await runTests(args);
const key = result.args.join(' ');
const passedOrFaild = result.err ? 'failed' : 'passed';
const seconds = result.time / 1000;

console.log('%s %s in %d seconds', key, passedOrFaild, seconds);
console.log('%s %s in %d seconds', key, passedOrFaild, seconds);

if (result.err && !definition.shouldFail) {
console.log(result.stdout);
console.log(result.stderr);
throw result.err;
}
if (result.err && !definition.shouldFail) {
console.log(result.stdout);
console.log(result.stderr);
throw result.err;
}

results[key] = results[key] || [];
results[key] = results[key] || [];

results[key].push({
passed: !results.err,
shouldFail: definition.shouldFail,
time: seconds
});
results[key].push({
passed: !results.err,
shouldFail: definition.shouldFail,
time: seconds
});
}).then(() => {
makeDir.sync(path.join(__dirname, '.results'));
Expand Down
4 changes: 2 additions & 2 deletions docs/recipes/debugging-with-webstorm.md
Expand Up @@ -13,7 +13,7 @@ In the `JavaScript file` field specify the path to AVA in the project's `node_mo

In the `Application parameters` pass the CLI flags you're using and the test files you would like to debug, for example `--verbose test.js`.

In the `Node parameters`, for Node.js 7+, pass the `--inspect-brk` flag to enable the Node inspector. For earlier versions use `--debug-brk`.
In the `Node parameters`, pass the `--inspect-brk` flag to enable the Node inspector.

Save the configuration.

Expand Down Expand Up @@ -44,7 +44,7 @@ Use the following configuration parameters:

Your IDE will then execute `npm run test` and thus call `node_modules/.bin/ava` and the AVA-configuration you have specified in your package.json.

In the `Node parameters`, for Node.js 7+ pass `--inspect-brk` or `--debug-brk` for earlier versions.
In the `Node parameters`, pass `--inspect-brk`.

Don't forget to select a Node.js interpreter.

Expand Down

0 comments on commit 3a4afc6

Please sign in to comment.