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:
Samuel Attard
2026-04-12 03:03:39 -07:00
parent 0d321ccae0
commit 64f3c1c199
5 changed files with 5 additions and 7 deletions

View File

@@ -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';

View File

@@ -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,

View File

@@ -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', () => {

View File

@@ -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');

View File

@@ -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';