From 7c9dbc9cd88ec350831a27b2658fb861372feed0 Mon Sep 17 00:00:00 2001 From: killagu Date: Tue, 20 Feb 2024 20:26:57 +0800 Subject: [PATCH] f --- .gitignore | 1 + .../egg-revert/node_modules/aliyun-egg/index.js | 15 +++++++++++++++ .../node_modules/aliyun-egg/package.json | 6 ++++++ test/lib/cmd/dev.test.js | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/egg-revert/node_modules/aliyun-egg/index.js create mode 100644 test/fixtures/egg-revert/node_modules/aliyun-egg/package.json diff --git a/.gitignore b/.gitignore index 9269fce1..787f51b5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ test/fixtures/ts/node_modules/aliyun-egg/ !test/fixtures/test-files-stack/node_modules/ !test/fixtures/example/node_modules/ !test/fixtures/example-ts-cluster/node_modules/ +!test/fixtures/egg-revert/node_modules/ !test/fixtures/example-ts-error-stack/node_modules/ !test/fixtures/egg-require/node_modules/ test/fixtures/example-ts-ets/typings/ diff --git a/test/fixtures/egg-revert/node_modules/aliyun-egg/index.js b/test/fixtures/egg-revert/node_modules/aliyun-egg/index.js new file mode 100644 index 00000000..dc41c309 --- /dev/null +++ b/test/fixtures/egg-revert/node_modules/aliyun-egg/index.js @@ -0,0 +1,15 @@ +'use strict'; + +exports.startCluster = options => { + console.log('options: %j', options); + if (process.execArgv.length) { + console.log('process.execArgv:', process.execArgv); + } + console.log('NODE_ENV: %s', process.env.NODE_ENV); + + // make sure exit + setTimeout(function() { + console.log('exist by setTimeout'); + process.exit(0); + }, 3000); +}; diff --git a/test/fixtures/egg-revert/node_modules/aliyun-egg/package.json b/test/fixtures/egg-revert/node_modules/aliyun-egg/package.json new file mode 100644 index 00000000..4e36e661 --- /dev/null +++ b/test/fixtures/egg-revert/node_modules/aliyun-egg/package.json @@ -0,0 +1,6 @@ +{ + "name": "aliyun-egg", + "dependencies": { + "egg": "*" + } +} diff --git a/test/lib/cmd/dev.test.js b/test/lib/cmd/dev.test.js index 603128a4..de21a5d8 100644 --- a/test/lib/cmd/dev.test.js +++ b/test/lib/cmd/dev.test.js @@ -177,7 +177,7 @@ describe('test/lib/cmd/dev.test.js', () => { .end(); }); - it.only('should support egg.revert', () => { + it('should support egg.revert', () => { if (version < 18) return; mm(process.env, 'NODE_ENV', 'development'); return coffee.fork(eggBin, [ 'dev' ], {