Skip to content

Commit b3e94ff

Browse files
committed
perf(tests): run e2e tests in band
1 parent 090ca7b commit b3e94ff

7 files changed

Lines changed: 30 additions & 30 deletions

File tree

e2e/__helpers__/test-case/runtime.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ export function run(name: string, options: RunTestOptions = {}): RunResult {
9797
}
9898

9999
// run in band
100-
if (!cmdArgs.includes('--runInBand')) {
101-
cmdArgs.push('--runInBand')
102-
}
100+
// if (!cmdArgs.includes('--runInBand')) {
101+
// cmdArgs.push('--runInBand')
102+
// }
103103

104104
const cmd = cmdArgs.shift() as string
105105

e2e/__tests__/__snapshots__/hoisting.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports[`Hoisting jest.mock() & jest.unmock() should pass using template "defaul
6262
`;
6363
6464
exports[`Hoisting jest.mock() & jest.unmock() should pass using template "default": output 1`] = `
65-
√ jest --runInBand
65+
√ jest
6666
↳ exit code: 0
6767
===[ STDOUT ]===================================================================
6868
@@ -142,7 +142,7 @@ exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-b
142142
`;
143143
144144
exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-babel-6": output 1`] = `
145-
√ jest --runInBand
145+
√ jest
146146
↳ exit code: 0
147147
===[ STDOUT ]===================================================================
148148
@@ -234,7 +234,7 @@ exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-b
234234
`;
235235
236236
exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-babel-7": output 1`] = `
237-
√ jest --runInBand
237+
√ jest
238238
↳ exit code: 0
239239
===[ STDOUT ]===================================================================
240240
@@ -313,7 +313,7 @@ exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-j
313313
`;
314314
315315
exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-jest-22": output 1`] = `
316-
√ jest --runInBand
316+
√ jest
317317
↳ exit code: 0
318318
===[ STDOUT ]===================================================================
319319
@@ -392,7 +392,7 @@ exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-t
392392
`;
393393
394394
exports[`Hoisting jest.mock() & jest.unmock() should pass using template "with-typescript-2-7": output 1`] = `
395-
√ jest --runInBand
395+
√ jest
396396
↳ exit code: 0
397397
===[ STDOUT ]===================================================================
398398

e2e/__tests__/__snapshots__/logger.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Array [
186186
`;
187187
188188
exports[`With unsupported version test should pass using template "with-unsupported-version" 1`] = `
189-
√ jest --runInBand
189+
√ jest
190190
↳ exit code: 0
191191
===[ STDOUT ]===================================================================
192192

e2e/__tests__/__snapshots__/simple.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Simple test should pass using template "default" 1`] = `
4-
√ jest --runInBand
4+
√ jest
55
↳ exit code: 0
66
===[ STDOUT ]===================================================================
77
@@ -19,7 +19,7 @@ exports[`Simple test should pass using template "default" 1`] = `
1919
`;
2020

2121
exports[`Simple test should pass using template "with-babel-6" 1`] = `
22-
√ jest --runInBand
22+
√ jest
2323
↳ exit code: 0
2424
===[ STDOUT ]===================================================================
2525
@@ -37,7 +37,7 @@ exports[`Simple test should pass using template "with-babel-6" 1`] = `
3737
`;
3838

3939
exports[`Simple test should pass using template "with-babel-7" 1`] = `
40-
√ jest --runInBand
40+
√ jest
4141
↳ exit code: 0
4242
===[ STDOUT ]===================================================================
4343
@@ -55,7 +55,7 @@ exports[`Simple test should pass using template "with-babel-7" 1`] = `
5555
`;
5656

5757
exports[`Simple test should pass using template "with-jest-22" 1`] = `
58-
√ jest --runInBand
58+
√ jest
5959
↳ exit code: 0
6060
===[ STDOUT ]===================================================================
6161
@@ -73,7 +73,7 @@ exports[`Simple test should pass using template "with-jest-22" 1`] = `
7373
`;
7474

7575
exports[`Simple test should pass using template "with-typescript-2-7" 1`] = `
76-
√ jest --runInBand
76+
√ jest
7777
↳ exit code: 0
7878
===[ STDOUT ]===================================================================
7979

e2e/__tests__/__snapshots__/source-map.test.ts.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ exports[`using template "default" should have the source mpas comment 1`] = `
3535
`;
3636
3737
exports[`using template "default" should report correct line numbers 1`] = `
38-
× jest --runInBand
38+
× jest
3939
↳ exit code: 1
4040
===[ STDOUT ]===================================================================
4141
console.log main.ts:2
@@ -123,7 +123,7 @@ exports[`using template "with-babel-6" should have the source mpas comment 1`] =
123123
`;
124124
125125
exports[`using template "with-babel-6" should report correct line numbers 1`] = `
126-
× jest --runInBand
126+
× jest
127127
↳ exit code: 1
128128
===[ STDOUT ]===================================================================
129129
console.log main.ts:2
@@ -217,7 +217,7 @@ exports[`using template "with-babel-7" should have the source mpas comment 1`] =
217217
`;
218218
219219
exports[`using template "with-babel-7" should report correct line numbers 1`] = `
220-
× jest --runInBand
220+
× jest
221221
↳ exit code: 1
222222
===[ STDOUT ]===================================================================
223223
console.log main.ts:2
@@ -305,7 +305,7 @@ exports[`using template "with-jest-22" should have the source mpas comment 1`] =
305305
`;
306306
307307
exports[`using template "with-jest-22" should report correct line numbers 1`] = `
308-
× jest --runInBand
308+
× jest
309309
↳ exit code: 1
310310
===[ STDOUT ]===================================================================
311311
console.log main.ts:2
@@ -391,7 +391,7 @@ exports[`using template "with-typescript-2-7" should have the source mpas commen
391391
`;
392392
393393
exports[`using template "with-typescript-2-7" should report correct line numbers 1`] = `
394-
× jest --runInBand
394+
× jest
395395
↳ exit code: 1
396396
===[ STDOUT ]===================================================================
397397
console.log main.ts:2

e2e/__tests__/__snapshots__/type-checking.test.ts.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`With type checking should fail using template "default" 1`] = `
4-
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":true}}} --runInBand
4+
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":true}}}
55
↳ exit code: 1
66
===[ STDOUT ]===================================================================
77
@@ -24,7 +24,7 @@ exports[`With type checking should fail using template "default" 1`] = `
2424
`;
2525

2626
exports[`With type checking should fail using template "with-babel-6" 1`] = `
27-
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":true}}} --runInBand
27+
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":true}}}
2828
↳ exit code: 1
2929
===[ STDOUT ]===================================================================
3030
@@ -47,7 +47,7 @@ exports[`With type checking should fail using template "with-babel-6" 1`] = `
4747
`;
4848

4949
exports[`With type checking should fail using template "with-babel-7" 1`] = `
50-
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":true}}} --runInBand
50+
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":true}}}
5151
↳ exit code: 1
5252
===[ STDOUT ]===================================================================
5353
@@ -70,7 +70,7 @@ exports[`With type checking should fail using template "with-babel-7" 1`] = `
7070
`;
7171

7272
exports[`With type checking should fail using template "with-jest-22" 1`] = `
73-
× jest --config {"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testMatch":["**/__tests__/**/*.js?(x)","**/?(*.)+(spec|test).js?(x)","**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"moduleFileExtensions":["js","json","jsx","node","ts","tsx"],"testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":true}}} --runInBand
73+
× jest --config {"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testMatch":["**/__tests__/**/*.js?(x)","**/?(*.)+(spec|test).js?(x)","**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"moduleFileExtensions":["js","json","jsx","node","ts","tsx"],"testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":true}}}
7474
↳ exit code: 1
7575
===[ STDOUT ]===================================================================
7676
@@ -93,7 +93,7 @@ exports[`With type checking should fail using template "with-jest-22" 1`] = `
9393
`;
9494

9595
exports[`With type checking should fail using template "with-typescript-2-7" 1`] = `
96-
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"diagnostics":{"ignoreCodes":[5023]},"typeCheck":true}}} --runInBand
96+
× jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"diagnostics":{"ignoreCodes":[5023]},"typeCheck":true}}}
9797
↳ exit code: 1
9898
===[ STDOUT ]===================================================================
9999
@@ -116,7 +116,7 @@ exports[`With type checking should fail using template "with-typescript-2-7" 1`]
116116
`;
117117

118118
exports[`Without type checking should pass using template "default" 1`] = `
119-
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":false}}} --runInBand
119+
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":false}}}
120120
↳ exit code: 0
121121
===[ STDOUT ]===================================================================
122122
@@ -133,7 +133,7 @@ exports[`Without type checking should pass using template "default" 1`] = `
133133
`;
134134

135135
exports[`Without type checking should pass using template "with-babel-6" 1`] = `
136-
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":false}}} --runInBand
136+
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":false}}}
137137
↳ exit code: 0
138138
===[ STDOUT ]===================================================================
139139
@@ -150,7 +150,7 @@ exports[`Without type checking should pass using template "with-babel-6" 1`] = `
150150
`;
151151

152152
exports[`Without type checking should pass using template "with-babel-7" 1`] = `
153-
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":false}}} --runInBand
153+
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"babelConfig":true,"typeCheck":false}}}
154154
↳ exit code: 0
155155
===[ STDOUT ]===================================================================
156156
@@ -167,7 +167,7 @@ exports[`Without type checking should pass using template "with-babel-7" 1`] = `
167167
`;
168168

169169
exports[`Without type checking should pass using template "with-jest-22" 1`] = `
170-
√ jest --config {"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testMatch":["**/__tests__/**/*.js?(x)","**/?(*.)+(spec|test).js?(x)","**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"moduleFileExtensions":["js","json","jsx","node","ts","tsx"],"testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":false}}} --runInBand
170+
√ jest --config {"transform":{"^.+\\\\.tsx?$":"ts-jest"},"testMatch":["**/__tests__/**/*.js?(x)","**/?(*.)+(spec|test).js?(x)","**/__tests__/**/*.ts?(x)","**/?(*.)+(spec|test).ts?(x)"],"moduleFileExtensions":["js","json","jsx","node","ts","tsx"],"testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"typeCheck":false}}}
171171
↳ exit code: 0
172172
===[ STDOUT ]===================================================================
173173
@@ -184,7 +184,7 @@ exports[`Without type checking should pass using template "with-jest-22" 1`] = `
184184
`;
185185

186186
exports[`Without type checking should pass using template "with-typescript-2-7" 1`] = `
187-
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"diagnostics":{"ignoreCodes":[5023]},"typeCheck":false}}} --runInBand
187+
√ jest --config {"preset":"ts-jest","testEnvironment":"node","globals":{"ts-jest":{"tsConfig":{},"diagnostics":{"ignoreCodes":[5023]},"typeCheck":false}}}
188188
↳ exit code: 0
189189
===[ STDOUT ]===================================================================
190190

scripts/e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (parentArgs.includes('--coverage')) {
2020
)
2121
parentArgs = parentArgs.filter(a => a !== '--coverage')
2222
}
23-
if (!parentArgs.includes('--runInBand')) parentArgs.push('--runInBand')
23+
// if (!parentArgs.includes('--runInBand')) parentArgs.push('--runInBand')
2424

2525
function getDirectories(rootDir) {
2626
return fs.readdirSync(rootDir).filter(function(file) {

0 commit comments

Comments
 (0)