Testing utilities for creating DOM environments and testing Qwik applications.
Create DOM environment for testing purposes.
/**
* Create DOM environment for testing
* @returns DOM interface for testing
*/
function createDOM(): any;Usage Examples:
import { createDOM } from "@builder.io/qwik/testing";
// Set up testing environment
const dom = createDOM();
// Use in tests
describe("Component tests", () => {
beforeEach(() => {
// Set up DOM for each test
global.document = dom.document;
global.window = dom.window;
});
it("should render component", () => {
// Test component rendering
});
});