Skip to content

Commit 3a4afc6

Browse files
authored
Require Node.js 8.9.4
* Remove support for `--debug` and `--debug-brk` CLI flags * Refactor to utilize object rest/spread and async/await
1 parent 2704b16 commit 3a4afc6

36 files changed

+511
-586
lines changed

.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ node_js:
66
- 11
77
- 10
88
- 8
9-
- 6
109
env:
1110
- FRESH_DEPS=false
1211
- FRESH_DEPS=true
@@ -16,13 +15,9 @@ matrix:
1615
env: FRESH_DEPS=true
1716
- node_js: 8
1817
env: FRESH_DEPS=true
19-
- node_js: 6
20-
env: FRESH_DEPS=true
2118
- node_js: 10
2219
env: FRESH_DEPS=true # Assume any bugs that occur with fresh dependencies are not platform specific.
2320
os: windows
24-
- node_js: 6
25-
os: windows # npm install --global currently fails on Windows. Skip the tests entirely instead.
2621
cache: npm
2722
before_install: if [[ "$(npm -v)" != "6.9.0" ]] && [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then npm install --global [email protected]; fi
2823
install: npm ci

bench/run.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -100,29 +100,28 @@ for (let i = 0; i < 11; i++) {
100100

101101
const results = {};
102102

103-
Promise.each(combined, definition => {
103+
Promise.each(combined, async definition => {
104104
const {args} = definition;
105105

106-
return runTests(args).then(result => {
107-
const key = result.args.join(' ');
108-
const passedOrFaild = result.err ? 'failed' : 'passed';
109-
const seconds = result.time / 1000;
106+
const result = await runTests(args);
107+
const key = result.args.join(' ');
108+
const passedOrFaild = result.err ? 'failed' : 'passed';
109+
const seconds = result.time / 1000;
110110

111-
console.log('%s %s in %d seconds', key, passedOrFaild, seconds);
111+
console.log('%s %s in %d seconds', key, passedOrFaild, seconds);
112112

113-
if (result.err && !definition.shouldFail) {
114-
console.log(result.stdout);
115-
console.log(result.stderr);
116-
throw result.err;
117-
}
113+
if (result.err && !definition.shouldFail) {
114+
console.log(result.stdout);
115+
console.log(result.stderr);
116+
throw result.err;
117+
}
118118

119-
results[key] = results[key] || [];
119+
results[key] = results[key] || [];
120120

121-
results[key].push({
122-
passed: !results.err,
123-
shouldFail: definition.shouldFail,
124-
time: seconds
125-
});
121+
results[key].push({
122+
passed: !results.err,
123+
shouldFail: definition.shouldFail,
124+
time: seconds
126125
});
127126
}).then(() => {
128127
makeDir.sync(path.join(__dirname, '.results'));

docs/recipes/debugging-with-webstorm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In the `JavaScript file` field specify the path to AVA in the project's `node_mo
1313

1414
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`.
1515

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

1818
Save the configuration.
1919

@@ -44,7 +44,7 @@ Use the following configuration parameters:
4444

4545
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.
4646

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

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

0 commit comments

Comments
 (0)