Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 27, 2024
1 parent ae0db57 commit 5a8dae3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"eslint-config-egg": "14",
"npminstall": "^7.12.0",
"rimraf": "6",
"supertest": "^7.0.0",
"tshy": "3",
"tshy-after": "1",
"typescript": "5"
Expand Down
4 changes: 2 additions & 2 deletions test/commands/cov.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ describe('test/commands/cov.test.ts', () => {
});

it('should support egg.revert', () => {
if (version < 18 || version > 20) return;
if (version !== 20) return;
mock(process.env, 'NODE_ENV', 'development');
return coffee.fork(eggBin, [ 'cov' ], {
cwd: getFixtures('egg-revert'),
})
// .debug()
.debug()
.expect('stdout', /SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding/)
.expect('stdout', /1 passing/)
.expect('code', 0)
Expand Down
4 changes: 2 additions & 2 deletions test/commands/dev.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ describe('test/commands/dev.test.ts', () => {
});

it('should support egg.revert', () => {
if (version < 18 || version > 20) return;
if (version !== 20) return;
mm(process.env, 'NODE_ENV', 'development');
return coffee.fork(eggBin, [ 'dev' ], {
cwd: getFixtures('egg-revert'),
})
// .debug()
.debug()
.expect('stdout', /SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding/)
.expect('code', 0)
.end();
Expand Down
4 changes: 2 additions & 2 deletions test/commands/test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ describe('test/commands/test.test.ts', () => {
});

it('should support egg.revert', () => {
if (version < 18 || version > 20) return;
if (version !== 20) return;
return coffee.fork(eggBin, [ 'test' ], {
cwd: getFixtures('egg-revert'),
})
// .debug()
.debug()
.expect('stdout', /SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding/)
.expect('code', 0)
.end();
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/example-ts-cluster/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('test/index.test.ts', () => {
before(() => {
app = mm.cluster({
opt: {
execArgv: [ '--require', importResolve('ts-node/register') ],
execArgv: [ '--require', 'ts-node/register' ],
},
} as MockOption);
// app.debug();
Expand Down
7 changes: 0 additions & 7 deletions test/ts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { runScript } from 'runscript';
import coffee from './coffee.js';
import { getRootDirname, getFixtures } from './helper.js';

const version = Number(process.version.substring(1, 3));

async function cpy(src: string, target: string) {
if (fs.cp) {
await fs.cp(src, target, { force: true, recursive: true });
Expand Down Expand Up @@ -76,11 +74,6 @@ describe('test/ts.test.ts', () => {
});

it('should cov app in cluster mod', () => {
if (version > 20) return;
// skip on darwin
// https://github.com/eggjs/egg-bin/runs/6735190362?check_suite_focus=true
// [agent_worker] receive disconnect event on child_process fork mode, exiting with code:110
if (process.platform === 'darwin') return;
cwd = getFixtures('example-ts-cluster');
return coffee.fork(eggBin, [ 'cov' ], { cwd })
.debug()
Expand Down

0 comments on commit 5a8dae3

Please sign in to comment.