Skip to content
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

improve readability of phishing page redirect tests #25667

Open
davidmurdoch opened this issue Jul 3, 2024 · 0 comments
Open

improve readability of phishing page redirect tests #25667

davidmurdoch opened this issue Jul 3, 2024 · 0 comments
Assignees
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template.

Comments

@davidmurdoch
Copy link
Contributor

davidmurdoch commented Jul 3, 2024

What is this about?

See #25153 (review) 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<void> }> 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: #25153 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template.
Projects
None yet
Development

No branches or pull requests

2 participants