From b1f3befe21da8953eddce26b3cf09294d7b46e94 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 11 Apr 2026 23:01:42 -0700 Subject: [PATCH] chore: migrate security-warnings-spec.ts to vitest --- .../{security-warnings-spec.ts => security-warnings.spec.ts} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename spec/{security-warnings-spec.ts => security-warnings.spec.ts} (98%) diff --git a/spec/security-warnings-spec.ts b/spec/security-warnings.spec.ts similarity index 98% rename from spec/security-warnings-spec.ts rename to spec/security-warnings.spec.ts index ff074f0a25..23bd4b8cbb 100644 --- a/spec/security-warnings-spec.ts +++ b/spec/security-warnings.spec.ts @@ -1,6 +1,7 @@ import { BrowserWindow, WebPreferences } from 'electron/main'; import { expect } from 'chai'; +import { afterAll, afterEach, beforeAll, describe, it } from 'vitest'; import * as fs from 'node:fs/promises'; import * as http from 'node:http'; @@ -25,7 +26,7 @@ describe('security warnings', () => { let useCsp = true; let serverUrl: string; - before(async () => { + beforeAll(async () => { // Create HTTP Server server = http.createServer(async (request, response) => { const uri = new URL(request.url!, `http://${request.headers.host}`).pathname!; @@ -51,7 +52,7 @@ describe('security warnings', () => { serverUrl = `http://localhost2:${(await listen(server)).port}`; }); - after(() => { + afterAll(() => { // Close server server.close(); server = null as unknown as any;