Show nested canvas directory and reduce canvas loading overhead
This commit is contained in:
@@ -83,3 +83,10 @@ test("canonical fingerprints ignore server JSON key ordering", async () => {
|
||||
const storage = { getItem: () => JSON.stringify({ document: local, dirty: true }) };
|
||||
assert.equal(readLocalRecovery(storage, "key", { version: 1, document: remote }), null);
|
||||
});
|
||||
|
||||
|
||||
test("board metadata and snapshot begin concurrently without a request waterfall", async () => {
|
||||
const started = []; const releases = [];
|
||||
const loading = loadBoardCanvas((path) => { started.push(path); return new Promise((resolve) => releases.push(() => resolve(path.endsWith("/canvas") ? { version: 1, document: emptyCanvas() } : { id: "board", workspace_id: "space", kind: "board" }))); }, "space", "board");
|
||||
assert.equal(started.length, 2); releases.forEach((release) => release()); await loading;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user