Skip to content
Permalink
Browse files

Require Node.js 8.9.4

* 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 3a4afc6cf35aeffb6b019c6b75fa9b8e071bb53d
@@ -6,7 +6,6 @@ node_js:
- 11
- 10
- 8
- 6
env:
- FRESH_DEPS=false
- FRESH_DEPS=true
@@ -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
@@ -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'));
@@ -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.

@@ -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.

Oops, something went wrong.

0 comments on commit 3a4afc6

Please sign in to comment.
You can’t perform that action at this time.