You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a test now that checks that the tests are skipped if the input is {}.
The problem is that in the test function, when we perform a getData, and TS shows the return type as WrappedDocument<v2.OpenAttestationDocument> not WrappedDocument<v2.OpenAttestationDocument> | undefined so it will be senseless to check for the malformed object in each and every of the verifier.
Here's some solutions, feel free to add more:
Perform the check at OA level in the getData function to ensure that the returned object is of the right shape or throw.
Perform the check BEFORE any verifications run to throw immediately instead of waiting for all the verifier to skip.
Remove the test. If the user fucks it up, it's none of our business.
Problem:
There is a test now that checks that the tests are skipped if the input is {}.
The problem is that in the test function, when we perform a
getData, and TS shows the return type asWrappedDocument<v2.OpenAttestationDocument>notWrappedDocument<v2.OpenAttestationDocument> | undefinedso it will be senseless to check for the malformed object in each and every of the verifier.Here's some solutions, feel free to add more: