From 44ade769e1cb84f96fa55e217fdb23480771bdaf Mon Sep 17 00:00:00 2001 From: Felipe Forbeck Date: Mon, 14 Oct 2024 13:34:08 -0300 Subject: [PATCH] fix(test): await promise and check error --- packages/upload-api/test/access-client-agent.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/upload-api/test/access-client-agent.js b/packages/upload-api/test/access-client-agent.js index a97ade0aa..c6ded27e1 100644 --- a/packages/upload-api/test/access-client-agent.js +++ b/packages/upload-api/test/access-client-agent.js @@ -380,7 +380,10 @@ export const test = { ) // deviceCheater shouldn't have access to the space - deviceCheater.setCurrentSpace(space.did()) + await assert.rejects(deviceCheater.setCurrentSpace(space.did()), { + name: 'Error', + message: `Agent has no proofs for ${space.did()}.`, + }) // deviceCheater tries to craft a delegation to gain access to the account const unattestedDelegation = await Top.top.delegate({