Skip to content

Commit 5b145b2

Browse files
committed
Try to fix timeout issues
1 parent 6813fae commit 5b145b2

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

packages/rtk-query-codegen-openapi/test/cli.test.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ afterEach(() => {
3333

3434
describe('CLI options testing', () => {
3535
test('generation with `config.example.js`', async () => {
36-
jest.setTimeout(10000);
37-
3836
const out = await cli([`./config.example.js`], __dirname);
3937

4038
expect(out).toEqual({
@@ -46,11 +44,9 @@ Done
4644
});
4745

4846
expect(fs.readFileSync(path.resolve(tmpDir, 'example.ts'), 'utf-8')).toMatchSnapshot();
49-
});
47+
}, 25000);
5048

5149
test('paths are relative to configfile, not to cwd', async () => {
52-
jest.setTimeout(10000);
53-
5450
const out = await cli([`../test/config.example.js`], path.resolve(__dirname, '../src'));
5551

5652
expect(out).toEqual({
@@ -62,11 +58,9 @@ Done
6258
});
6359

6460
expect(fs.readFileSync(path.resolve(tmpDir, 'example.ts'), 'utf-8')).toMatchSnapshot();
65-
});
61+
}, 25000);
6662

6763
test('ts, js and json all work the same', async () => {
68-
jest.setTimeout(25000);
69-
7064
await cli([`./config.example.js`], __dirname);
7165
const fromJs = fs.readFileSync(path.resolve(tmpDir, 'example.ts'), 'utf-8');
7266
await cli([`./config.example.ts`], __dirname);
@@ -76,12 +70,10 @@ Done
7670

7771
expect(fromTs).toEqual(fromJs);
7872
expect(fromJson).toEqual(fromJs);
79-
});
73+
}, 25000);
8074

8175
test('missing parameters doesnt fail', async () => {
82-
jest.setTimeout(25000);
83-
8476
const out = await cli([`./config.invalid-example.json`], __dirname);
85-
expect(out.stderr).toContain("Error: path parameter petId does not seem to be defined in '/pet/{petId}'!")
86-
});
77+
expect(out.stderr).toContain("Error: path parameter petId does not seem to be defined in '/pet/{petId}'!");
78+
}, 25000);
8779
});

0 commit comments

Comments
 (0)