From 8e2f3003ac0cb94c65a33d45307c26d35ad5c6b1 Mon Sep 17 00:00:00 2001 From: juergba Date: Fri, 7 May 2021 15:54:18 +0200 Subject: [PATCH] drop support of Node v10 --- .github/workflows/mocha.yml | 2 -- docs/index.md | 4 ++-- package.json | 2 +- test/integration/parallel.spec.js | 25 +++++++++---------------- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/mocha.yml b/.github/workflows/mocha.yml index b827d646ef..fdc0a00029 100644 --- a/.github/workflows/mocha.yml +++ b/.github/workflows/mocha.yml @@ -25,7 +25,6 @@ jobs: - ubuntu-latest - windows-2019 node: - - 10 - 12 - 14 - 16 @@ -70,7 +69,6 @@ jobs: - ubuntu-latest - windows-2019 node: - - 10 - 12 - 14 - 16 diff --git a/docs/index.md b/docs/index.md index b0d31b4e7b..953f7bfef9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 @@ -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. diff --git a/package.json b/package.json index d29216fa79..d6f3ff84e0 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "test": "./test" }, "engines": { - "node": ">= 10.12.0" + "node": ">= 12.0.0" }, "scripts": { "prepublishOnly": "nps test clean build", diff --git a/test/integration/parallel.spec.js b/test/integration/parallel.spec.js index 5f6a1f7459..b019307414 100644 --- a/test/integration/parallel.spec.js +++ b/test/integration/parallel.spec.js @@ -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); }); });