We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe27433 commit 72fd598Copy full SHA for 72fd598
tests/client/handlers/vaults.test.ts
@@ -2399,7 +2399,11 @@ describe('vaultsSecretsRemove', () => {
2399
await writer.close();
2400
for await (const data of response.readable) {
2401
expect(data.type).toStrictEqual('error');
2402
- console.log(data)
+ // TS cannot properly evaluate a type as nested as this, so we use the
2403
+ // as keyword to help it. Inside this block, the type of data is 'error'.
2404
+ const error = data as ErrorMessage;
2405
+ // The error code should be an invalid operation
2406
+ expect(error.code).toStrictEqual('EINVAL');
2407
}
2408
// Check
2409
await vaultManager.withVaults([vaultId], async (vault) => {
0 commit comments