Skip to content

Commit 8263ed5

Browse files
committed
f
1 parent 1944f27 commit 8263ed5

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ on:
99
jobs:
1010
Job:
1111
name: Node.js
12-
uses: node-modules/github-actions/.github/workflows/node-test-parallel.yml@test-parallel
12+
uses: node-modules/github-actions/.github/workflows/node-test-parallel.yml@master
1313
with:
1414
os: 'ubuntu-latest, macos-latest, windows-latest'
1515
version: '18, 20, 22'
1616
parallel: 2
17-
action_ref: 'test-parallel'
1817
secrets:
1918
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test/fixtures/example-ts-cluster/test/index.test.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1+
import { scheduler } from 'node:timers/promises';
12
import mm, { MockOption } from '@eggjs/mock';
23
import request from 'supertest';
34

4-
describe('test/index.test.ts', () => {
5+
describe('example-ts-cluster/test/index.test.ts', () => {
56
let app: any;
6-
before(() => {
7+
before(async () => {
78
app = mm.cluster({
89
opt: {
910
execArgv: [ '--require', 'ts-node/register' ],
1011
},
1112
} as MockOption);
12-
// app.debug();
13-
return app.ready();
13+
app.debug();
14+
await app.ready();
15+
await scheduler.wait(1000);
1416
});
1517

1618
after(() => app.close());
1719
it('should work', async () => {
18-
const req = request(`http://127.0.0.1:${app.port}`);
19-
return req
20+
const url = `http://127.0.0.1:${app.port}`;
21+
console.log('request %s', url);
22+
await request(url)
2023
.get('/')
2124
.expect('hi, egg')
2225
.expect(200);

0 commit comments

Comments
 (0)