mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
chore: route itremote/remotely closure imports through remote-tools
Swaps expect/setTimeout/BrowserWindow imports in the 5 files flagged by remote-tools-imports/no-foreign-imports-in-remote-closure so their stringified closures resolve via the __rt shim. Import-line changes only.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { nativeImage } from 'electron/common';
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'vitest';
|
||||
|
||||
import * as path from 'node:path';
|
||||
|
||||
import { expect } from './lib/remote-tools';
|
||||
import { ifdescribe, ifit, itremote, useRemoteContext } from './lib/spec-helpers';
|
||||
import { expectDeprecationMessages } from './lib/warning-helpers';
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
MessageBoxOptions
|
||||
} from 'electron/main';
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from 'vitest';
|
||||
import * as ws from 'ws';
|
||||
|
||||
@@ -26,6 +25,7 @@ import * as path from 'node:path';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import { expect } from './lib/remote-tools';
|
||||
import {
|
||||
ifit,
|
||||
ifdescribe,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { BrowserWindow } from 'electron';
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { describe, it } from 'vitest';
|
||||
|
||||
@@ -7,6 +5,7 @@ import { spawn, spawnSync } from 'node:child_process';
|
||||
import { once } from 'node:events';
|
||||
import path = require('node:path');
|
||||
|
||||
import { BrowserWindow } from './lib/remote-tools';
|
||||
import { startRemoteControlApp } from './lib/spec-helpers';
|
||||
|
||||
describe('fuses', () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { webContents } from 'electron/main';
|
||||
|
||||
import { expect } from 'chai';
|
||||
import { afterAll, afterEach, beforeEach, describe, it } from 'vitest';
|
||||
|
||||
import * as childProcess from 'node:child_process';
|
||||
@@ -18,6 +17,7 @@ import {
|
||||
spawn
|
||||
} from './lib/codesign-helpers';
|
||||
import { withTempDirectory } from './lib/fs-helpers';
|
||||
import { expect } from './lib/remote-tools';
|
||||
import { getRemoteContext, ifdescribe, ifit, itremote, useRemoteContext, withDone } from './lib/spec-helpers';
|
||||
|
||||
const mainFixturesPath = path.resolve(__dirname, 'fixtures');
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import { BrowserWindow, session, ipcMain, app, WebContents } from 'electron/main';
|
||||
|
||||
import * as auth from 'basic-auth';
|
||||
import { expect } from 'chai';
|
||||
import { afterAll, afterEach, beforeAll, beforeEach, describe, it } from 'vitest';
|
||||
|
||||
import { once } from 'node:events';
|
||||
import * as http from 'node:http';
|
||||
import * as path from 'node:path';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
import * as url from 'node:url';
|
||||
|
||||
import { emittedUntil } from './lib/events-helpers';
|
||||
import { expect, setTimeout } from './lib/remote-tools';
|
||||
import { HexColors, ScreenCapture, hasCapturableScreen } from './lib/screen-helpers';
|
||||
import { ifit, ifdescribe, defer, itremote, useRemoteContext, listen } from './lib/spec-helpers';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
|
||||
Reference in New Issue
Block a user