1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 03:20:23 +01:00
metamask-extension/ui
Dan J Miller c2163434db Fix and test log.info calls run for each migration (#20517)
* Fix and test log.info calls run for each migration

In migrator/index.js, log.info is called before an after each migration.
These calls are intended to produce breadcrumbs to be captured by sentry
in cases where errors happen during or shortly after migrations are run.
These calls were not causing any output to the console because the log.setLevel
calls in ui/index.js were setting a 'warn value in local storage that was being
used by logLevel in the background.

This commit fixes the problem by setting the `persist` param of setLevel to
false, so that the background no longer reads the ui's log level.

Tests are added to verify that these logs are captured in sentry breadcrumbs
when there is a migration error due to an invariant state.

* Improve breadcrumb message matching

The test modified in this commit asserts eqaulity of  messages from breadcrumbs
and hard coded expected results. This could cause failures, as sometimes the
messages contain whitespace characters. This commit ensures the assertions only
check that the expected string is within the message string, ignoring extra
characters.
2023-08-18 11:16:42 -02:30
..
__mocks__
components Fix 'Global Menu Explorer / Account Details' What's New (#20371) 2023-08-03 13:49:32 -02:30
contexts
css
ducks Improvements to Swaps quote auto-selection logic, fix and edge case with zero-balance tokens (#20388) 2023-08-03 18:22:17 -02:30
helpers Add improved downloading logic when exporting state logs (#19872) 2023-07-27 15:45:51 -02:30
hooks fix(clipboard): Increase DEFAULT copy to clipboard time (#20008) 2023-07-27 15:59:16 -02:30
pages Improvements to Swaps quote auto-selection logic, fix and edge case with zero-balance tokens (#20388) 2023-08-03 18:22:17 -02:30
selectors Fix 'Global Menu Explorer / Account Details' What's New (#20371) 2023-08-03 13:49:32 -02:30
store Add additional Sentry E2E tests (#20425) 2023-08-16 14:46:53 -02:30
index.js Fix and test log.info calls run for each migration (#20517) 2023-08-18 11:16:42 -02:30
index.test.js