-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: improve throw error assertions (and fix one test) (#760)
# Motivation I noticed that the pattern to assert functions throw errors in ic-mgmt could be improved. While doing so, I noticed that one test was actually asserting an error but, the root cause was due to an incorect function mock # Changes - Use ` await expect(call).rejects.toThrow(error);` to assert for errors - i.e. assert the error is the one mocked - Fix mock for `provisional_create_canister_with_cycles` error assertion which was mockding `delete_canister` (I guess copy/paste error) Signed-off-by: David Dal Busco <[email protected]>
- Loading branch information
1 parent
11e43df
commit 51d6b46
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters