1- // Flags: --no-warnings --test-name-pattern=enabled --test-name-pattern=/pattern/i
1+ // Flags: --no-warnings --test-name-pattern=enabled --test-name-pattern=yes --test-name-pattern= /pattern/i
22'use strict' ;
33const common = require ( '../../../common' ) ;
44const {
@@ -18,7 +18,7 @@ it('top level it enabled', common.mustCall());
1818it ( 'top level it disabled' , common . mustNotCall ( ) ) ;
1919it . skip ( 'top level skipped it disabled' , common . mustNotCall ( ) ) ;
2020it . skip ( 'top level skipped it enabled' , common . mustNotCall ( ) ) ;
21- describe ( 'top level describe disabled' , common . mustNotCall ( ) ) ;
21+ describe ( 'top level describe never disabled' , common . mustCall ( ) ) ;
2222describe . skip ( 'top level skipped describe disabled' , common . mustNotCall ( ) ) ;
2323describe . skip ( 'top level skipped describe enabled' , common . mustNotCall ( ) ) ;
2424test ( 'top level runs because name includes PaTtErN' , common . mustCall ( ) ) ;
@@ -38,10 +38,30 @@ describe('top level describe enabled', () => {
3838 afterEach ( common . mustCall ( 3 ) ) ;
3939 after ( common . mustCall ( ) ) ;
4040
41- it ( 'nested it disabled' , common . mustNotCall ( ) ) ;
41+ it ( 'nested it not disabled' , common . mustCall ( ) ) ;
4242 it ( 'nested it enabled' , common . mustCall ( ) ) ;
43- describe ( 'nested describe disabled' , common . mustNotCall ( ) ) ;
43+ describe ( 'nested describe not disabled' , common . mustCall ( ) ) ;
4444 describe ( 'nested describe enabled' , common . mustCall ( ( ) => {
4545 it ( 'is enabled' , common . mustCall ( ) ) ;
4646 } ) ) ;
4747} ) ;
48+
49+ describe ( 'yes' , function ( ) {
50+ it ( 'no' , ( ) => { } ) ;
51+ it ( 'yes' , ( ) => { } ) ;
52+
53+ describe ( 'maybe' , function ( ) {
54+ it ( 'no' , ( ) => { } ) ;
55+ it ( 'yes' , ( ) => { } ) ;
56+ } ) ;
57+ } ) ;
58+
59+ describe ( 'no' , function ( ) {
60+ it ( 'no' , ( ) => { } ) ;
61+ it ( 'yes' , ( ) => { } ) ;
62+
63+ describe ( 'maybe' , function ( ) {
64+ it ( 'no' , ( ) => { } ) ;
65+ it ( 'yes' , ( ) => { } ) ;
66+ } ) ;
67+ } ) ;
0 commit comments