From 850eed07666f6cd6e4a4ea5cc316140519eeb514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Tue, 24 Feb 2026 12:06:43 +0100 Subject: [PATCH] update ci --- tests/setup.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/setup.ts b/tests/setup.ts index b79204b..43a10cd 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -9,7 +9,10 @@ vi.mock('@mdxeditor/editor', () => import('./mocks/mdxeditor')); afterEach(() => { cleanup(); - localStorage.clear(); + const storage = globalThis.window?.localStorage ?? globalThis.localStorage; + if (typeof storage?.clear === 'function') { + storage.clear(); + } vi.restoreAllMocks(); vi.useRealTimers(); });