refactor: use node scheme imports in spec (#38487)

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-06-15 16:42:27 +02:00 committed by GitHub
parent bf1ba4a857
commit d78f37ec8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 533 additions and 352 deletions

View file

@ -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 ?? [])})