File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,11 @@ describe('adds matcher', () => {
120120 } ) ;
121121
122122 await expect ( htmllintProblemMatcher ( ) ) . resolves . toBeUndefined ( ) ;
123-
124- let hasMatch = false ;
125- for ( const log of logs ) {
126- if ( typeof log === 'string' && log . includes ( '::add-matcher' ) ) {
127- hasMatch = true ;
128- break ;
129- }
130- }
131- expect ( hasMatch ) . toBe ( true ) ;
123+ expect ( logs ) . toEqual (
124+ expect . arrayContaining ( [
125+ expect . stringContaining ( '::add-matcher::' ) ,
126+ ] ) ,
127+ ) ;
132128 logMock . mockRestore ( ) ;
133129 } ) ;
134130} ) ;
@@ -149,15 +145,11 @@ describe('removes matcher', () => {
149145 } ) ;
150146
151147 await expect ( htmllintProblemMatcher ( ) ) . resolves . toBeUndefined ( ) ;
152-
153- let hasMatch = false ;
154- for ( const log of logs ) {
155- if ( typeof log === 'string' && log . includes ( '::remove-matcher' ) ) {
156- hasMatch = true ;
157- break ;
158- }
159- }
160- expect ( hasMatch ) . toBe ( true ) ;
148+ expect ( logs ) . toEqual (
149+ expect . arrayContaining ( [
150+ expect . stringContaining ( '::remove-matcher' ) ,
151+ ] ) ,
152+ ) ;
161153 logMock . mockRestore ( ) ;
162154 } ) ;
163155} ) ;
You can’t perform that action at this time.
0 commit comments