From d2a5c72b5fdffdc200a53694dfb9a81794999059 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 11 Apr 2026 23:00:25 -0700 Subject: [PATCH] chore: migrate api-web-frame-spec.ts to vitest --- spec/{api-web-frame-spec.ts => api-web-frame.spec.ts} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename spec/{api-web-frame-spec.ts => api-web-frame.spec.ts} (98%) diff --git a/spec/api-web-frame-spec.ts b/spec/api-web-frame.spec.ts similarity index 98% rename from spec/api-web-frame-spec.ts rename to spec/api-web-frame.spec.ts index 5a4a5690ee..97ddcffade 100644 --- a/spec/api-web-frame-spec.ts +++ b/spec/api-web-frame.spec.ts @@ -1,6 +1,7 @@ import { BrowserWindow, ipcMain, WebContents } from 'electron/main'; import { expect } from 'chai'; +import { afterAll, beforeAll, describe, it } from 'vitest'; import { once } from 'node:events'; import * as path from 'node:path'; @@ -77,7 +78,7 @@ describe('webFrame module', () => { describe('api', () => { let w: WebContents; let win: BrowserWindow; - before(async () => { + beforeAll(async () => { win = new BrowserWindow({ show: false, webPreferences: { contextIsolation: false, nodeIntegration: true } }); await win.loadURL('data:text/html,'); w = win.webContents; @@ -89,7 +90,7 @@ describe('webFrame module', () => { `); }); - after(() => { + afterAll(() => { win.close(); win = null as unknown as BrowserWindow; });