@@ -11,29 +11,29 @@ import {extractSummary, run} from '../Utils';
1111import runJest from '../runJest' ;
1212
1313test ( 'console printing' , ( ) => {
14- const { stderr, status } = runJest ( 'console' ) ;
14+ const { stderr, exitCode } = runJest ( 'console' ) ;
1515 const { summary, rest} = extractSummary ( stderr ) ;
1616
17- expect ( status ) . toBe ( 0 ) ;
17+ expect ( exitCode ) . toBe ( 0 ) ;
1818 expect ( wrap ( rest ) ) . toMatchSnapshot ( ) ;
1919 expect ( wrap ( summary ) ) . toMatchSnapshot ( ) ;
2020} ) ;
2121
2222test ( 'console printing with --verbose' , ( ) => {
23- const { stderr, stdout, status } = runJest ( 'console' , [
23+ const { stderr, stdout, exitCode } = runJest ( 'console' , [
2424 '--verbose' ,
2525 '--no-cache' ,
2626 ] ) ;
2727 const { summary, rest} = extractSummary ( stderr ) ;
2828
29- expect ( status ) . toBe ( 0 ) ;
29+ expect ( exitCode ) . toBe ( 0 ) ;
3030 expect ( wrap ( stdout ) ) . toMatchSnapshot ( ) ;
3131 expect ( wrap ( rest ) ) . toMatchSnapshot ( ) ;
3232 expect ( wrap ( summary ) ) . toMatchSnapshot ( ) ;
3333} ) ;
3434
3535test ( 'does not print to console with --silent' , ( ) => {
36- const { stderr, stdout, status } = runJest ( 'console' , [
36+ const { stderr, stdout, exitCode } = runJest ( 'console' , [
3737 // Need to pass --config because console test specifies `verbose: false`
3838 '--config=' +
3939 JSON . stringify ( {
@@ -44,18 +44,18 @@ test('does not print to console with --silent', () => {
4444 ] ) ;
4545 const { summary, rest} = extractSummary ( stderr ) ;
4646
47- expect ( status ) . toBe ( 0 ) ;
47+ expect ( exitCode ) . toBe ( 0 ) ;
4848 expect ( wrap ( stdout ) ) . toMatchSnapshot ( ) ;
4949 expect ( wrap ( rest ) ) . toMatchSnapshot ( ) ;
5050 expect ( wrap ( summary ) ) . toMatchSnapshot ( ) ;
5151} ) ;
5252
5353// issue: https://github.com/facebook/jest/issues/5223
5454test ( 'the jsdom console is the same as the test console' , ( ) => {
55- const { stderr, stdout, status } = runJest ( 'console-jsdom' ) ;
55+ const { stderr, stdout, exitCode } = runJest ( 'console-jsdom' ) ;
5656 const { summary, rest} = extractSummary ( stderr ) ;
5757
58- expect ( status ) . toBe ( 0 ) ;
58+ expect ( exitCode ) . toBe ( 0 ) ;
5959 expect ( wrap ( stdout ) ) . toMatchSnapshot ( ) ;
6060 expect ( wrap ( rest ) ) . toMatchSnapshot ( ) ;
6161 expect ( wrap ( summary ) ) . toMatchSnapshot ( ) ;
@@ -64,10 +64,10 @@ test('the jsdom console is the same as the test console', () => {
6464test ( 'does not error out when using winston' , ( ) => {
6565 const dir = path . resolve ( __dirname , '../console-winston' ) ;
6666 run ( 'yarn' , dir ) ;
67- const { stderr, stdout, status } = runJest ( dir ) ;
67+ const { stderr, stdout, exitCode } = runJest ( dir ) ;
6868 const { summary, rest} = extractSummary ( stderr ) ;
6969
70- expect ( status ) . toBe ( 0 ) ;
70+ expect ( exitCode ) . toBe ( 0 ) ;
7171 expect ( wrap ( stdout ) ) . toMatchSnapshot ( ) ;
7272 expect ( wrap ( rest ) ) . toMatchSnapshot ( ) ;
7373 expect ( wrap ( summary ) ) . toMatchSnapshot ( ) ;
0 commit comments