Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support of Node v10 #4633

Merged
merged 1 commit into from May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/mocha.yml
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
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
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
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);
});
});