refactor: use for-of instead of for simple array iteration (#39338)

This commit is contained in:
Milan Burda 2023-08-07 11:30:15 +02:00 committed by GitHub
parent 67523a47b4
commit 3d45429667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 20 deletions

View file

@ -60,8 +60,8 @@ ifdescribe(!process.arch.includes('arm') && process.platform !== 'win32')('deskt
const sources = await desktopCapturer.getSources({ types: ['screen'] });
expect(sources).to.be.an('array').of.length(displays.length);
for (let i = 0; i < sources.length; i++) {
expect(sources[i].display_id).to.equal(displays[i].id.toString());
for (const [i, source] of sources.entries()) {
expect(source.display_id).to.equal(displays[i].id.toString());
}
});