mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: replace .indexOf() with .includes() (#39195)
This commit is contained in:
@@ -948,7 +948,7 @@ describe('Menu module', function () {
|
||||
await new Promise<void>((resolve) => {
|
||||
appProcess.stdout.on('data', data => {
|
||||
output += data;
|
||||
if (data.indexOf('Window has') > -1) {
|
||||
if (data.includes('Window has')) {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@ import { listen } from './lib/spec-helpers';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
|
||||
const messageContainsSecurityWarning = (event: Event, level: number, message: string) => {
|
||||
return message.indexOf('Electron Security Warning') > -1;
|
||||
return message.includes('Electron Security Warning');
|
||||
};
|
||||
|
||||
const isLoaded = (event: Event, level: number, message: string) => {
|
||||
|
||||
Reference in New Issue
Block a user