Skip to content

Commit 9da97c6

Browse files
committed
skip test retry test on jasmine
1 parent 384285b commit 9da97c6

File tree

3 files changed

+18
-53
lines changed

3 files changed

+18
-53
lines changed

e2e/__tests__/circusConcurrentEach.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
import {skipSuiteOnJasmine} from '@jest/test-utils';
78
import {json as runWithJson} from '../runJest';
89

10+
skipSuiteOnJasmine();
11+
912
it('works with concurrent.each', () => {
10-
const {json} = runWithJson('circus-concurrent', [
11-
'concurrent-each.test.js',
12-
'--testRunner=jest-circus/runner',
13-
]);
13+
const {json} = runWithJson('circus-concurrent', ['concurrent-each.test.js']);
1414
expect(json.numTotalTests).toBe(4);
1515
expect(json.numPassedTests).toBe(2);
1616
expect(json.numFailedTests).toBe(0);
@@ -20,7 +20,6 @@ it('works with concurrent.each', () => {
2020
it('works with concurrent.only.each', () => {
2121
const {json} = runWithJson('circus-concurrent', [
2222
'concurrent-only-each.test.js',
23-
'--testRunner=jest-circus/runner',
2423
]);
2524
expect(json.numTotalTests).toBe(4);
2625
expect(json.numPassedTests).toBe(2);

e2e/__tests__/toMatchInlineSnapshotWithRetries.test.ts

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import * as path from 'path';
9+
import {skipSuiteOnJasmine} from '@jest/test-utils';
910
import {cleanup, makeTemplate, writeFiles} from '../Utils';
1011
import runJest from '../runJest';
1112

@@ -15,6 +16,8 @@ const TESTS_DIR = path.resolve(DIR, '__tests__');
1516
beforeEach(() => cleanup(TESTS_DIR));
1617
afterAll(() => cleanup(TESTS_DIR));
1718

19+
skipSuiteOnJasmine();
20+
1821
test('works with a single snapshot', () => {
1922
const filename = 'basic-support.test.js';
2023
const template = makeTemplate(`
@@ -39,12 +42,7 @@ test('works with a single snapshot', () => {
3942
writeFiles(TESTS_DIR, {
4043
[filename]: template(['index', '2' /* retries */]),
4144
});
42-
const {stderr, exitCode} = runJest(DIR, [
43-
'-w=1',
44-
'--ci=false',
45-
'--testRunner=jest-circus/runner',
46-
filename,
47-
]);
45+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
4846
expect(stderr).toMatch('Received: 2');
4947
expect(stderr).toMatch('1 snapshot failed from 1 test suite.');
5048
expect(exitCode).toBe(1);
@@ -54,12 +52,7 @@ test('works with a single snapshot', () => {
5452
writeFiles(TESTS_DIR, {
5553
[filename]: template(['index', '4' /* retries */]),
5654
});
57-
const {stderr, exitCode} = runJest(DIR, [
58-
'-w=1',
59-
'--ci=false',
60-
'--testRunner=jest-circus/runner',
61-
filename,
62-
]);
55+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
6356
expect(stderr).toMatch('Snapshots: 1 passed, 1 total');
6457
expect(exitCode).toBe(0);
6558
}
@@ -113,12 +106,7 @@ test('works when multiple tests have snapshots but only one of them failed multi
113106
writeFiles(TESTS_DIR, {
114107
[filename]: template(['index', '2' /* retries */]),
115108
});
116-
const {stderr, exitCode} = runJest(DIR, [
117-
'-w=1',
118-
'--ci=false',
119-
'--testRunner=jest-circus/runner',
120-
filename,
121-
]);
109+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
122110
expect(stderr).toMatch('Snapshot name: `with retries snapshots 1`');
123111
expect(stderr).toMatch('Received: 2');
124112
expect(stderr).toMatch('1 snapshot failed from 1 test suite.');
@@ -129,12 +117,7 @@ test('works when multiple tests have snapshots but only one of them failed multi
129117
writeFiles(TESTS_DIR, {
130118
[filename]: template(['index', '4' /* retries */]),
131119
});
132-
const {stderr, exitCode} = runJest(DIR, [
133-
'-w=1',
134-
'--ci=false',
135-
'--testRunner=jest-circus/runner',
136-
filename,
137-
]);
120+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
138121
expect(stderr).toMatch('Snapshots: 1 passed, 1 total');
139122
expect(exitCode).toBe(0);
140123
}

e2e/__tests__/toMatchSnapshotWithRetries.test.ts

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import * as path from 'path';
9+
import {skipSuiteOnJasmine} from '@jest/test-utils';
910
import {cleanup, makeTemplate, writeFiles} from '../Utils';
1011
import runJest from '../runJest';
1112

@@ -15,6 +16,8 @@ const TESTS_DIR = path.resolve(DIR, '__tests__');
1516
beforeEach(() => cleanup(TESTS_DIR));
1617
afterAll(() => cleanup(TESTS_DIR));
1718

19+
skipSuiteOnJasmine();
20+
1821
test('works with a single snapshot', () => {
1922
const filename = 'basic-support.test.js';
2023
const template = makeTemplate(`
@@ -39,12 +42,7 @@ test('works with a single snapshot', () => {
3942
writeFiles(TESTS_DIR, {
4043
[filename]: template(['index', '2' /* retries */]),
4144
});
42-
const {stderr, exitCode} = runJest(DIR, [
43-
'-w=1',
44-
'--ci=false',
45-
'--testRunner=jest-circus/runner',
46-
filename,
47-
]);
45+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
4846
expect(stderr).toMatch('Received: 2');
4947
expect(stderr).toMatch('1 snapshot failed from 1 test suite.');
5048
expect(exitCode).toBe(1);
@@ -54,12 +52,7 @@ test('works with a single snapshot', () => {
5452
writeFiles(TESTS_DIR, {
5553
[filename]: template(['index', '4' /* retries */]),
5654
});
57-
const {stderr, exitCode} = runJest(DIR, [
58-
'-w=1',
59-
'--ci=false',
60-
'--testRunner=jest-circus/runner',
61-
filename,
62-
]);
55+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
6356
expect(stderr).toMatch('Snapshots: 1 passed, 1 total');
6457
expect(exitCode).toBe(0);
6558
}
@@ -92,12 +85,7 @@ test('works when multiple tests have snapshots but only one of them failed multi
9285
writeFiles(TESTS_DIR, {
9386
[filename]: template(['index', '2' /* retries */]),
9487
});
95-
const {stderr, exitCode} = runJest(DIR, [
96-
'-w=1',
97-
'--ci=false',
98-
'--testRunner=jest-circus/runner',
99-
filename,
100-
]);
88+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
10189
expect(stderr).toMatch('Received: 2');
10290
expect(stderr).toMatch('1 snapshot failed from 1 test suite.');
10391
expect(exitCode).toBe(1);
@@ -107,12 +95,7 @@ test('works when multiple tests have snapshots but only one of them failed multi
10795
writeFiles(TESTS_DIR, {
10896
[filename]: template(['index', '4' /* retries */]),
10997
});
110-
const {stderr, exitCode} = runJest(DIR, [
111-
'-w=1',
112-
'--ci=false',
113-
'--testRunner=jest-circus/runner',
114-
filename,
115-
]);
98+
const {stderr, exitCode} = runJest(DIR, ['-w=1', '--ci=false', filename]);
11699
expect(stderr).toMatch('Snapshots: 1 passed, 1 total');
117100
expect(exitCode).toBe(0);
118101
}

0 commit comments

Comments
 (0)