Files
ComfyUI-Lora-Manager/tests/frontend/setup.js
2025-09-24 15:39:52 +08:00

17 lines
416 B
JavaScript

import { afterEach, beforeEach } from 'vitest';
import { resetDom } from './utils/domFixtures.js';
beforeEach(() => {
// Ensure storage is clean before each test to avoid cross-test pollution
localStorage.clear();
sessionStorage.clear();
// Reset DOM state for modules that rely on body attributes
resetDom();
});
afterEach(() => {
// Clean any dynamically attached globals by tests
resetDom();
});