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

Fix extension mocking during tests #3773

Merged
merged 6 commits into from
Feb 13, 2025
Merged

Fix extension mocking during tests #3773

merged 6 commits into from
Feb 13, 2025

Conversation

hyphenized
Copy link
Collaborator

@hyphenized hyphenized commented Feb 5, 2025

Fixed testing setup of jest-webextension-mock and, removed the custom webextension-polyfill mock as it was no longer necessary.

Missing methods not supplied by jest-webextension-mock are initialized during setup through setup-extension-mock.ts. Also fixed an await omission in a test...

Latest build: extension-builds-3773 (as of Thu, 06 Feb 2025 00:21:17 GMT).

Fixed testing setup of `jest-webextension-mock` and, removed the custom
`webextension-polyfill` mock as it was no longer necessary.

Missing methods not supplied by `jest-webextension-mock` are initialized
during setup through `setup-extension-mock.ts`. Also fixed an `await`
omission in a test...
Logging was just adding noise to the summary of the test run
Random hash cannot be used as a valid eth address
@hyphenized hyphenized self-assigned this Feb 5, 2025
@@ -11,7 +11,7 @@ const IS_CI = process.env.CI === "true"
// CI workflows to get an overview of both failed expectations and possible errors.
// This is not the case during development, hence, we set the minimum log level to warning
// as it helps with debugging while writing new tests.
logger.logLevel = IS_CI ? LogLevel.error : LogLevel.warn
logger.logLevel = IS_CI ? LogLevel.off : LogLevel.warn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not want error logs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I removed it because jest already points at where a test failed

Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big improvement and unblocks CI, left one question for later. Let's :shipit:

@Shadowfiend Shadowfiend merged commit 037fa86 into main Feb 13, 2025
5 of 6 checks passed
@Shadowfiend Shadowfiend deleted the testing-tests branch February 13, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants