refactor: use node scheme imports in spec (#38487)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
bf1ba4a857
commit
d78f37ec8f
105 changed files with 533 additions and 352 deletions
|
@ -1,19 +1,19 @@
|
|||
import { expect } from 'chai';
|
||||
import * as childProcess from 'child_process';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as qs from 'querystring';
|
||||
import * as http from 'http';
|
||||
import * as os from 'os';
|
||||
import { AddressInfo } from 'net';
|
||||
import * as childProcess from 'node:child_process';
|
||||
import * as path from 'node:path';
|
||||
import * as fs from 'node:fs';
|
||||
import * as qs from 'node:querystring';
|
||||
import * as http from 'node:http';
|
||||
import * as os from 'node:os';
|
||||
import { AddressInfo } from 'node:net';
|
||||
import { app, BrowserWindow, BrowserView, dialog, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, webFrameMain, session, WebContents, WebFrameMain } from 'electron/main';
|
||||
|
||||
import { emittedUntil, emittedNTimes } from './lib/events-helpers';
|
||||
import { ifit, ifdescribe, defer, listen } from './lib/spec-helpers';
|
||||
import { closeWindow, closeAllWindows } from './lib/window-helpers';
|
||||
import { areColorsSimilar, captureScreen, HexColors, getPixelColor } from './lib/screen-helpers';
|
||||
import { once } from 'events';
|
||||
import { setTimeout } from 'timers/promises';
|
||||
import { once } from 'node:events';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
|
||||
const fixtures = path.resolve(__dirname, 'fixtures');
|
||||
const mainFixtures = path.resolve(__dirname, 'fixtures');
|
||||
|
@ -3463,7 +3463,7 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
w.loadURL('about:blank');
|
||||
const [, rendererEventEmitterProperties] = await once(ipcMain, 'answer');
|
||||
const { EventEmitter } = require('events');
|
||||
const { EventEmitter } = require('node:events');
|
||||
const emitter = new EventEmitter();
|
||||
const browserEventEmitterProperties = [];
|
||||
let currentObj = emitter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue