tts-voice-creator-clone-and.../scratch/test_bundle.js
mARTin-B78 b43bacc275
Some checks are pending
Test and SonarQube / quality (push) Waiting to run
chore: add local maintenance utilities
2026-09-09 07:53:13 +02:00

23 lines
904 B
JavaScript

const { JSDOM } = require("jsdom");
const dom = new JSDOM(`<!DOCTYPE html><html><body><div id="status-message"></div></body></html>`);
global.window = dom.window;
global.document = dom.window.document;
global.navigator = dom.window.navigator;
global.location = dom.window.location;
global.localStorage = { getItem: () => null, setItem: () => null, removeItem: () => null };
global.fetch = () => Promise.resolve({ ok: true, json: () => Promise.resolve({}) });
global.$ = (id) => document.getElementById(id) || document.createElement('div');
global.toast = () => {};
global.escapeHtml = () => '';
global.escHtml = () => '';
global.debounce = () => {};
global.audiobookIsChapter = () => false;
global.initCloneSampleText = () => {};
try {
require('../static/dist/main.min.js');
console.log("Bundle executed successfully without top-level errors!");
} catch (e) {
console.error("Bundle error:", e);
}