Skip to content

Commit

Permalink
Drop support of Node v10 (#4633)
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba authored May 21, 2021
1 parent 5064c28 commit 641970d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- ubuntu-latest
- windows-2019
node:
- 10
- 12
- 14
- 16
Expand Down Expand Up @@ -70,7 +69,6 @@ jobs:
- ubuntu-latest
- windows-2019
node:
- 10
- 12
- 14
- 16
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ or as a development dependency for your project:
$ npm install --save-dev mocha
```

> As of v8.0.0, Mocha requires Node.js v10.12.0 or newer.
> As of v9.0.0, Mocha requires Node.js v12.0.0 or newer.
## Getting Started

Expand Down Expand Up @@ -116,7 +116,7 @@ $ npm test

## Run Cycle Overview

> Updated for v9.0.0.
> Updated for v8.0.0.
The following is a mid-level outline of Mocha's "flow of execution" when run in Node.js; the "less important" details have been omitted.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"test": "./test"
},
"engines": {
"node": ">= 10.12.0"
"node": ">= 12.0.0"
},
"scripts": {
"prepublishOnly": "nps test clean build",
Expand Down
25 changes: 9 additions & 16 deletions test/integration/parallel.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@

const assert = require('assert');
const {runMochaJSONAsync} = require('./helpers');
const semver = require('semver');

describe('parallel run', () => {
/**
* @see https://github.com/mochajs/mocha/issues/4559
*/
it('should allow `import {it} from "mocha"` module syntax', async () => {
if (semver.major(process.version) <= 10) {
console.log(
`[SKIPPED] for node ${process.version} (es module syntax isn't supported on node <= 10)`
);
} else {
const result = await runMochaJSONAsync('parallel/test3.mjs', [
'--parallel',
'--jobs',
'2',
require.resolve('./fixtures/parallel/test1.mjs'),
require.resolve('./fixtures/parallel/test2.mjs')
]);
assert.strictEqual(result.stats.failures, 1);
assert.strictEqual(result.stats.passes, 2);
}
const result = await runMochaJSONAsync('parallel/test3.mjs', [
'--parallel',
'--jobs',
'2',
require.resolve('./fixtures/parallel/test1.mjs'),
require.resolve('./fixtures/parallel/test2.mjs')
]);
assert.strictEqual(result.stats.failures, 1);
assert.strictEqual(result.stats.passes, 2);
});
});

0 comments on commit 641970d

Please sign in to comment.