feat: rewrite collab server connecting (#4881)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Milos Vetesnik 2022-03-06 22:43:02 +01:00 committed by GitHub
parent 9392ec276d
commit 5ca4f5bbf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 49 additions and 17 deletions

View file

@ -15,6 +15,14 @@ Object.defineProperty(window, "crypto", {
},
});
jest.mock("../excalidraw-app/data/index.ts", () => ({
__esmodule: true,
...jest.requireActual("../excalidraw-app/data/index.ts"),
getCollabServer: jest.fn(() => ({
url: /* doesn't really matter */ "http://localhost:3002",
})),
}));
jest.mock("../excalidraw-app/data/firebase.ts", () => {
const loadFromFirebase = async () => null;
const saveToFirebase = () => {};