@@ -1055,31 +1055,32 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
10551055 const suites = events . filter ( event => event . type === 'test_suite_end' )
10561056 // this is not retried by the jest worker, so it's just 3 suites
10571057 assert . equal ( suites . length , 3 )
1058- const failedTestSuites = suites . filter (
1058+ const badImportTestSuites = suites . filter (
10591059 suite => suite . content . meta [ TEST_SUITE ] ===
10601060 'ci-visibility/jest-bad-import-torn-down/jest-bad-import-test.js'
10611061 )
1062- assert . equal ( failedTestSuites . length , 1 )
1063- const [ failedTestSuite ] = failedTestSuites
1062+ assert . equal ( badImportTestSuites . length , 1 )
1063+ const [ badImportTestSuite ] = badImportTestSuites
10641064
1065- assert . equal ( failedTestSuite . content . meta [ TEST_STATUS ] , 'fail' )
1065+ // jest still reports the test suite as passing
1066+ assert . equal ( badImportTestSuite . content . meta [ TEST_STATUS ] , 'pass' )
10661067 assert . include (
1067- failedTestSuite . content . meta [ ERROR_MESSAGE ] ,
1068+ badImportTestSuite . content . meta [ ERROR_MESSAGE ] ,
10681069 'a file after the Jest environment has been torn down'
10691070 )
10701071 assert . include (
1071- failedTestSuite . content . meta [ ERROR_MESSAGE ] ,
1072+ badImportTestSuite . content . meta [ ERROR_MESSAGE ] ,
10721073 'From ci-visibility/jest-bad-import-torn-down/jest-bad-import-test.js'
10731074 )
10741075 // This is the error message that jest should show. We check that we don't mess it up.
1075- assert . include ( failedTestSuite . content . meta [ ERROR_MESSAGE ] , 'off-timing-import' )
1076- assert . include ( failedTestSuite . content . meta [ ERROR_MESSAGE ] , 'afterAll' )
1077- assert . include ( failedTestSuite . content . meta [ ERROR_MESSAGE ] , 'nextTick' )
1076+ assert . include ( badImportTestSuite . content . meta [ ERROR_MESSAGE ] , 'off-timing-import' )
1077+ assert . include ( badImportTestSuite . content . meta [ ERROR_MESSAGE ] , 'afterAll' )
1078+ assert . include ( badImportTestSuite . content . meta [ ERROR_MESSAGE ] , 'nextTick' )
10781079
10791080 const passedTestSuites = suites . filter (
10801081 suite => suite . content . meta [ TEST_STATUS ] === 'pass'
10811082 )
1082- assert . equal ( passedTestSuites . length , 2 )
1083+ assert . equal ( passedTestSuites . length , 3 )
10831084 } )
10841085
10851086 childProcess = exec ( runTestsCommand , {
0 commit comments