Skip to content

Commit 75fe971

Browse files
committed
run codegen tests in band
1 parent 75fa769 commit 75fe971

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/rtk-query-codegen-openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"prepare": "npm run build && chmod +x ./lib/bin/cli.js",
2222
"format": "prettier --write \"src/**/*.ts\"",
2323
"test:update": "lib/bin/cli.js test/fixtures/petstore.json --file test/fixtures/generated.ts -h",
24-
"test": "jest",
24+
"test": "jest --runInBand",
2525
"cli": "esr src/bin/cli.ts"
2626
},
2727
"files": [

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ import fs from 'fs';
44
import path from 'path';
55
import del from 'del';
66

7-
const tmpDir = fs.mkdtempSync(path.resolve(__dirname, 'tmp'), 'utf-8');
7+
const tmpDir = path.resolve(__dirname, 'tmp');
88

99
beforeAll(async () => {
1010
if (!fs.existsSync(tmpDir)) fs.mkdirSync(tmpDir, { recursive: true });
1111
});
1212

1313
afterEach(() => {
14-
del.sync(`${tmpDir}/*.*`);
15-
});
16-
17-
afterAll(() => {
18-
del.sync(tmpDir);
14+
del.sync(`${tmpDir}/*.ts`);
1915
});
2016

2117
test('calling without `outputFile` returns the generated api', async () => {

0 commit comments

Comments
 (0)