-
Notifications
You must be signed in to change notification settings - Fork 401
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
Conversation
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
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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
Fixed testing setup of
jest-webextension-mock
and, removed the customwebextension-polyfill
mock as it was no longer necessary.Missing methods not supplied by
jest-webextension-mock
are initialized during setup throughsetup-extension-mock.ts
. Also fixed anawait
omission in a test...Latest build: extension-builds-3773 (as of Thu, 06 Feb 2025 00:21:17 GMT).