mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: library init/import race conditions (#5101)
This commit is contained in:
parent
6a0f800716
commit
d53ac2a61e
11 changed files with 248 additions and 133 deletions
|
@ -14,12 +14,12 @@ describe("library", () => {
|
|||
});
|
||||
|
||||
it("import library via drag&drop", async () => {
|
||||
expect(await h.app.library.loadLibrary()).toEqual([]);
|
||||
expect(await h.app.library.getLatestLibrary()).toEqual([]);
|
||||
await API.drop(
|
||||
await API.loadFile("./fixtures/fixture_library.excalidrawlib"),
|
||||
);
|
||||
await waitFor(async () => {
|
||||
expect(await h.app.library.loadLibrary()).toEqual([
|
||||
expect(await h.app.library.getLatestLibrary()).toEqual([
|
||||
{
|
||||
status: "unpublished",
|
||||
elements: [expect.objectContaining({ id: "A" })],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue