chore: migrate tests to vitest#32
Open
stephancill wants to merge 3 commits intoMobileWalletProtocol:masterfrom
Open
chore: migrate tests to vitest#32stephancill wants to merge 3 commits intoMobileWalletProtocol:masterfrom
stephancill wants to merge 3 commits intoMobileWalletProtocol:masterfrom
Conversation
stephancill
commented
Mar 11, 2025
| <link rel="shortcut icon" sizes="16x16 24x24" href="/favicon.ico"> | ||
| `; | ||
| expect(getFavicon()).toEqual('http://localhost/favicon.ico'); | ||
| expect(getFavicon()).toEqual('http://localhost:3000/favicon.ico'); |
Author
There was a problem hiding this comment.
Not entirely sure if this is acceptable, but in the vitest environment window.location.host includes the port whereas in the jest environment it does not
stephancill
commented
Mar 11, 2025
Comment on lines
7
to
23
| const invalidArgsError = (args) => | ||
| standardErrors.rpc.invalidRequest({ | ||
| standardErrors.rpc.invalidParams({ | ||
| message: 'Expected a single, non-array, object argument.', | ||
| data: args, | ||
| }); | ||
| // @ts-expect-error-next-line | ||
| const invalidMethodError = (args) => | ||
| standardErrors.rpc.invalidRequest({ | ||
| standardErrors.rpc.invalidParams({ | ||
| message: "'args.method' must be a non-empty string.", | ||
| data: args, | ||
| }); | ||
| // @ts-expect-error-next-line | ||
| const invalidParamsError = (args) => | ||
| standardErrors.rpc.invalidRequest({ | ||
| standardErrors.rpc.invalidParams({ | ||
| message: "'args.params' must be an object or array if provided.", | ||
| data: args, | ||
| }); |
Author
There was a problem hiding this comment.
There was a mismatch between the returned and expected error code here which was not picked up in jest tests for some reason
1e283a3 to
499a15d
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrated tests to vitest
How did you test your changes?
Ensured all tests are being executed correctly and pass as with jest.