File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class ActivityCollector {
67
67
const violations = [ ] ;
68
68
function v ( msg ) { violations . push ( msg ) ; }
69
69
for ( const a of this . _activities . values ( ) ) {
70
- if ( types != null && types . indexOf ( a . type ) < 0 ) continue ;
70
+ if ( types != null && ! types . includes ( a . type ) ) continue ;
71
71
72
72
if ( a . init && a . init . length > 1 ) {
73
73
v ( 'Activity inited twice\n' + activityString ( a ) +
@@ -131,7 +131,7 @@ class ActivityCollector {
131
131
132
132
activitiesOfTypes ( types ) {
133
133
if ( ! Array . isArray ( types ) ) types = [ types ] ;
134
- return this . activities . filter ( ( x ) => types . indexOf ( x . type ) >= 0 ) ;
134
+ return this . activities . filter ( ( x ) => types . includes ( x . type ) ) ;
135
135
}
136
136
137
137
get activities ( ) {
Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ const warningRegEx = new RegExp(
411
411
} ) ;
412
412
413
413
// no `biu`
414
- assert . strictEqual ( data . indexOf ( 'ele.biu' ) , - 1 ) ;
414
+ assert . strictEqual ( data . includes ( 'ele.biu' ) , false ) ;
415
415
} ) ) ;
416
416
} ) ;
417
417
You can’t perform that action at this time.
0 commit comments