mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix library dnd (#2314)
This commit is contained in:
parent
8a50916ef2
commit
ba3f548b91
16 changed files with 261 additions and 168 deletions
|
@ -29,6 +29,17 @@ jest.mock("../data/firebase.ts", () => {
|
|||
};
|
||||
});
|
||||
|
||||
jest.mock("socket.io-client", () => {
|
||||
return () => {
|
||||
return {
|
||||
close: () => {},
|
||||
on: () => {},
|
||||
off: () => {},
|
||||
emit: () => {},
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
describe("collaboration", () => {
|
||||
it("creating room should reset deleted elements", async () => {
|
||||
render(
|
||||
|
@ -50,7 +61,7 @@ describe("collaboration", () => {
|
|||
expect(API.getStateHistory().length).toBe(1);
|
||||
});
|
||||
|
||||
h.app.openPortal();
|
||||
await h.app.openPortal();
|
||||
await waitFor(() => {
|
||||
expect(h.elements).toEqual([expect.objectContaining({ id: "A" })]);
|
||||
expect(API.getStateHistory().length).toBe(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue