test: corrige testes dependentes de plataforma (navigator no Node 22, caminho com unidade no Windows)

This commit is contained in:
Winícius 2026-11-23 13:47:06 -03:00
parent be7c2829f0
commit 54499b2ae6
2 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ test('Frontend - extractFilePaths, renderFileChips e modais de preview devem fun
const dom = new JSDOM(html); const dom = new JSDOM(html);
global.window = dom.window; global.window = dom.window;
global.document = dom.window.document; global.document = dom.window.document;
global.navigator = dom.window.navigator; Object.defineProperty(globalThis, 'navigator', { value: dom.window.navigator, configurable: true, writable: true });
global.WebSocket = MockSocket; global.WebSocket = MockSocket;
// Executa o script do app // Executa o script do app

View File

@ -75,7 +75,7 @@ test('Frontend - Downloads Sob Demanda, Catálogo em Memória e Alternância Voz
const dom = new JSDOM(html); const dom = new JSDOM(html);
global.window = dom.window; global.window = dom.window;
global.document = dom.window.document; global.document = dom.window.document;
global.navigator = dom.window.navigator; Object.defineProperty(globalThis, 'navigator', { value: dom.window.navigator, configurable: true, writable: true });
global.WebSocket = MockSocket; global.WebSocket = MockSocket;
// Importa a lógica do frontend // Importa a lógica do frontend