File tree 3 files changed +38
-2
lines changed
integration-tests/__tests__
3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ const runJest = require('../runJest');
14
14
const { extractSummary} = require ( '../Utils' ) ;
15
15
const dir = path . resolve ( __dirname , '../each' ) ;
16
16
const SkipOnWindows = require ( '../../scripts/SkipOnWindows' ) ;
17
+ const SkipOnJestCircus = require ( '../../scripts/SkipOnJestCircus' ) ;
17
18
18
19
SkipOnWindows . suite ( ) ;
20
+ SkipOnJestCircus . suite ( ) ;
19
21
20
22
test ( 'works with passing tests' , ( ) => {
21
23
const result = runJest ( dir , [ 'success.test.js' ] ) ;
Original file line number Diff line number Diff line change @@ -68,8 +68,12 @@ async function runTestInternal(
68
68
69
69
/* $FlowFixMe */
70
70
const TestEnvironment = ( require ( testEnvironment ) : EnvironmentClass ) ;
71
- /* $FlowFixMe */
72
- const testFramework = ( require ( config . testRunner ) : TestFramework ) ;
71
+ const testFramework = ( ( process . env . JEST_CIRCUS === '1'
72
+ ? /* $FlowFixMe */
73
+ require ( 'jest-circus/build/legacy_code_todo_rewrite/jest_adapter.js' ) // eslint-disable-line import/no-extraneous-dependencies
74
+ . default
75
+ : /* $FlowFixMe */
76
+ require ( config . testRunner ) ) : TestFramework ) ;
73
77
/* $FlowFixMe */
74
78
const Runtime = ( require ( config . moduleLoader || 'jest-runtime' ) : Class <
75
79
RuntimeClass ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
8
+ */
9
+
10
+ /* eslint-disable jest/no-focused-tests */
11
+
12
+ const SkipOnJestCircus = {
13
+ suite ( ) {
14
+ if ( process . env . JEST_CIRCUS === '1' ) {
15
+ fit ( 'does not work on jest-circus' , ( ) => {
16
+ console . warn ( '[SKIP] Does not work on jest-circus' ) ;
17
+ } ) ;
18
+ }
19
+ } ,
20
+
21
+ test ( ) {
22
+ if ( process . env . JEST_CIRCUS === '1' ) {
23
+ console . warn ( '[SKIP] Does not work on jest-circus' ) ;
24
+ return true ;
25
+ }
26
+ return false ;
27
+ } ,
28
+ } ;
29
+
30
+ module . exports = SkipOnJestCircus ;
You can’t perform that action at this time.
0 commit comments