MetaMask / MetaMask/metamask-extension
improve readability of phishing page redirect tests
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### What is this about?
See https://github.com/MetaMask/metamask-extension/pull/25153#pullrequestreview-2157329626 and https://github.com/MetaMask/metamask-extension/pull/25153/files#diff-16a95c1c106d76dcf604b39cf5f6a8a8ccde12e2a8440c7c6db2c223070ac6c1R2 for more context.
In an attempt to make things "better" (subjectively), I actually made things worse (objectively 😅 ).
> Perhaps `withFixtures` should be refactored to be used in its current form, as well as in a form that makes the patterns in this PR less chaotic; maybe a `startFixtures` function that returns something like `Promise<{ driver, <... etc...>, end: () => Promise }>` where `end` could be called by the `after`/`afterAll`.
The patterns introduced in the linked PR go against the guidelines in https://github.com/MetaMask/contributor-docs/blob/main/docs/unit-testing.md
And "while you're in there", tackle this function param refactoring as well: https://github.com/MetaMask/metamask-extension/pull/25153#discussion_r1664722936
Contributor guide
Assessment
This issue has not been assessed yet.