diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index bab1671..bc5799c 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -15,4 +15,4 @@ jobs: uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: os: 'ubuntu-latest, macos-latest' - version: '14, 16, 18' + version: '14, 16, 18, 20' diff --git a/test/lib/cmd/dev.test.js b/test/lib/cmd/dev.test.js index ea17345..08e9e74 100644 --- a/test/lib/cmd/dev.test.js +++ b/test/lib/cmd/dev.test.js @@ -3,6 +3,7 @@ const coffee = require('coffee'); const net = require('net'); const mm = require('mm'); const detect = require('detect-port'); +const version = Number(process.version.substring(1, 3)); describe('test/lib/cmd/dev.test.js', () => { const eggBin = require.resolve('../../../bin/egg-bin.js'); @@ -177,6 +178,7 @@ describe('test/lib/cmd/dev.test.js', () => { }); it('should support egg.revert', () => { + if (version < 18) return; mm(process.env, 'NODE_ENV', 'development'); return coffee.fork(eggBin, [ 'dev' ], { cwd: path.join(__dirname, '../../fixtures/egg-revert'), diff --git a/test/lib/cmd/test.test.js b/test/lib/cmd/test.test.js index 7f9f350..7efcb55 100644 --- a/test/lib/cmd/test.test.js +++ b/test/lib/cmd/test.test.js @@ -4,6 +4,7 @@ const mm = require('mm'); const assert = require('assert'); const changed = require('jest-changed-files'); const Command = require('../../../lib/cmd/test'); +const version = Number(process.version.substring(1, 3)); describe('test/lib/cmd/test.test.js', () => { const eggBin = require.resolve('../../../bin/egg-bin.js'); @@ -302,6 +303,7 @@ describe('test/lib/cmd/test.test.js', () => { }); it('should support egg.revert', () => { + if (version < 18) return; return coffee.fork(eggBin, [ 'test' ], { cwd: path.join(__dirname, '../../fixtures/egg-revert'), })