refactor: use for-of
instead of for
simple array iteration (#39338)
This commit is contained in:
parent
67523a47b4
commit
3d45429667
5 changed files with 20 additions and 20 deletions
|
@ -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());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue