-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: refactor jest test negative test cases - phase 1 #3483
Labels
enhancement
New feature or request
Comments
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 18, 2024
--------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 18, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 26, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
This issue is now dependent on this issue |
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Aug 26, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Sep 3, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
5 tasks
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Sep 21, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
ashnashahgrover
added a commit
to ashnashahgrover/cacti
that referenced
this issue
Sep 21, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
petermetz
pushed a commit
to ashnashahgrover/cacti
that referenced
this issue
Oct 15, 2024
Primary Changes --------------- 1. Refactored all remaining negative test case exception assertions under cacti/packages Removed try-catch blocks, replaced with declarations through jest-extended's own API. Fixes hyperledger-cacti#3483 Signed-off-by: ashnashahgrover <[email protected]>
ruzell22
added a commit
to ruzell22/cactus
that referenced
this issue
Feb 28, 2025
Primary Changes --------------- 1. Transformed negative jest test try-catch block into a more concise version which points out exactly what was not matching assertions if there is a failure 2. Modified invokeRawWeb3EthMethod to accommodate the test case which has missing value for params 3. Tested the test cases which has code changes and confirmed they are passing Fixes: hyperledger-cacti#3483 Signed-off-by: ruzell22 <[email protected]>
5 tasks
petermetz
pushed a commit
to ruzell22/cactus
that referenced
this issue
Mar 7, 2025
Primary Changes --------------- 1. Transformed negative jest test try-catch block into a more concise version which points out exactly what was not matching assertions if there is a failure 2. Modified invokeRawWeb3EthMethod to accommodate the test case which has missing value for params 3. Tested the test cases which has code changes and confirmed they are passing Peter's Updates --------------- 1. Fixed the merge conflicts 2. identity-client.test.ts: Re-arranged the test setup (beforeAll handlers) so that the websocket wallets can be properly torn down after the tests are done (afterAll handlers) Fixes: hyperledger-cacti#3483 Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: ruzell22 <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
petermetz
pushed a commit
to ruzell22/cactus
that referenced
this issue
Mar 7, 2025
Primary Changes --------------- 1. Transformed negative jest test try-catch block into a more concise version which points out exactly what was not matching assertions if there is a failure 2. Modified invokeRawWeb3EthMethod to accommodate the test case which has missing value for params 3. Tested the test cases which has code changes and confirmed they are passing Peter's Updates --------------- 1. Fixed the merge conflicts 2. identity-client.test.ts: Re-arranged the test setup (beforeAll handlers) so that the websocket wallets can be properly torn down after the tests are done (afterAll handlers) 3. Applied the automatic formatter on the diff to pass the linter Fixes: hyperledger-cacti#3483 Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: ruzell22 <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refactor all the remaining negative test case exception assertions for all tests in cacti/packages so that they do not use try-catch blocks but instead declare the requirements through Jest's (and jest-extended's) own API.
The parent issue with a much more detailed explanation of what's needed and code examples on how to do it:
Parent Issue: #3455
Acceptance Criteria
Test passes the same as before
Negative test case assertions have been migrated the way it is explained in the parent issue.
The text was updated successfully, but these errors were encountered: