mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 20:10:24 +08:00
fix: test case for delete workspace
This commit is contained in:
@@ -48,10 +48,13 @@ test.describe.serial('local provider', () => {
|
|||||||
expect(workspaces.workspaces.length).toEqual(1);
|
expect(workspaces.workspaces.length).toEqual(1);
|
||||||
/**
|
/**
|
||||||
* FIXME
|
* FIXME
|
||||||
* Running following code will crash the worker, and get error like next line:
|
* If we don't wrap setTimeout,
|
||||||
|
* Running deleteWorkspace will crash the worker, and get error like next line:
|
||||||
* InvalidStateError: An operation was called on an object on which it is not allowed or at a time when it is not allowed. Also occurs if a request is made on a source object that has been deleted or removed. Use TransactionInactiveError or ReadOnlyError when possible, as they are more specific variations of InvalidStateError.
|
* InvalidStateError: An operation was called on an object on which it is not allowed or at a time when it is not allowed. Also occurs if a request is made on a source object that has been deleted or removed. Use TransactionInactiveError or ReadOnlyError when possible, as they are more specific variations of InvalidStateError.
|
||||||
* */
|
* */
|
||||||
// await provider.deleteWorkspace(workspaces.workspaces[0].id);
|
setTimeout(async () => {
|
||||||
// expect(workspaces.workspaces.length).toEqual(0);
|
await provider.deleteWorkspace(workspaces.workspaces[0].id);
|
||||||
|
expect(workspaces.workspaces.length).toEqual(0);
|
||||||
|
}, 10);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user