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,10 +1,10 @@
|
|||
import * as childProcess from 'child_process';
|
||||
import * as path from 'path';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import * as net from 'net';
|
||||
import * as v8 from 'v8';
|
||||
import * as url from 'url';
|
||||
import * as childProcess from 'node:child_process';
|
||||
import * as path from 'node:path';
|
||||
import * as http from 'node:http';
|
||||
import * as https from 'node:https';
|
||||
import * as net from 'node:net';
|
||||
import * as v8 from 'node:v8';
|
||||
import * as url from 'node:url';
|
||||
import { SuiteFunction, TestFunction } from 'mocha';
|
||||
import { BrowserWindow } from 'electron/main';
|
||||
import { AssertionError } from 'chai';
|
||||
|
@ -181,7 +181,7 @@ export async function itremote (name: string, fn: Function, args?: any[]) {
|
|||
const { ok, message } = await w.webContents.executeJavaScript(`(async () => {
|
||||
try {
|
||||
const chai_1 = require('chai')
|
||||
const promises_1 = require('timers/promises')
|
||||
const promises_1 = require('node:timers/promises')
|
||||
chai_1.use(require('chai-as-promised'))
|
||||
chai_1.use(require('dirty-chai'))
|
||||
await (${fn})(...${JSON.stringify(args ?? [])})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue