mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
test(server): should await throwsAsync assert (#9631)
This commit is contained in:
@@ -383,12 +383,12 @@ test('should be able to revoke team member', async t => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
// no permission
|
// no permission
|
||||||
t.throwsAsync(
|
await t.throwsAsync(
|
||||||
revokeUser(app, read.token.token, ws.id, read.id),
|
revokeUser(app, read.token.token, ws.id, read.id),
|
||||||
{ instanceOf: Error },
|
{ instanceOf: Error },
|
||||||
'should throw error if not admin'
|
'should throw error if not admin'
|
||||||
);
|
);
|
||||||
t.throwsAsync(
|
await t.throwsAsync(
|
||||||
revokeUser(app, read.token.token, ws.id, write.id),
|
revokeUser(app, read.token.token, ws.id, write.id),
|
||||||
{ instanceOf: Error },
|
{ instanceOf: Error },
|
||||||
'should throw error if not admin'
|
'should throw error if not admin'
|
||||||
|
|||||||
Reference in New Issue
Block a user