jest-websocket-mock
Version:
Mock websockets and assert complex websocket interactions with Jest
14 lines (11 loc) • 314 B
JavaScript
const { act } = require("react-dom/test-utils");
describe("The index", () => {
it("can be imported without errors", () => {
const root = document.createElement("div");
root.setAttribute("id", "root");
document.body.appendChild(root);
act(() => {
require("./index.tsx");
});
});
});