@@ -69,4 +69,29 @@ describe('default reporter', async () => {
6969 expect ( result . stderr ) . not . toContain ( `Serialized Error` )
7070 expect ( result . stderr ) . not . toContain ( `status: 'not found'` )
7171 } )
72+
73+ test ( 'prints skipped tests by default when a single file is run' , async ( ) => {
74+ const { stdout } = await runVitest ( {
75+ include : [ 'fixtures/all-passing-or-skipped.test.ts' ] ,
76+ reporters : [ [ 'default' , { isTTY : true , summary : false } ] ] ,
77+ config : 'fixtures/vitest.config.ts' ,
78+ } )
79+
80+ expect ( stdout ) . toContain ( '✓ fixtures/all-passing-or-skipped.test.ts (2 tests | 1 skipped)' )
81+ expect ( stdout ) . toContain ( '✓ 2 + 3 = 5' )
82+ expect ( stdout ) . toContain ( '↓ 3 + 3 = 6' )
83+ } )
84+
85+ test ( 'hides skipped tests when --hideSkippedTests and a single file is run' , async ( ) => {
86+ const { stdout } = await runVitest ( {
87+ include : [ 'fixtures/all-passing-or-skipped.test.ts' ] ,
88+ reporters : [ [ 'default' , { isTTY : true , summary : false } ] ] ,
89+ hideSkippedTests : true ,
90+ config : false ,
91+ } )
92+
93+ expect ( stdout ) . toContain ( '✓ fixtures/all-passing-or-skipped.test.ts (2 tests | 1 skipped)' )
94+ expect ( stdout ) . toContain ( '✓ 2 + 3 = 5' )
95+ expect ( stdout ) . not . toContain ( '↓ 3 + 3 = 6' )
96+ } )
7297} , 120000 )
0 commit comments