1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-25 11:28:51 +01:00
metamask-extension/test
Dan J Miller ca1ddeb59b
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:15:45 -02:30
..
data Add Opt-out Settings toggle for 4byte contract method names resolution (#20098) 2023-08-04 13:28:37 -04:00
e2e Fix and test log.info calls run for each migration (#20517) 2023-08-18 11:15:45 -02:30
helpers Upgrade assets-controllers to v9 (#19472) 2023-06-09 15:48:48 -05:00
jest adapt to use networksMetadata state instead of single networkStatus and networksDetails state (#20219) 2023-08-03 12:31:35 -05:00
lib feat(srp): add a quiz to the SRP reveal (#19283) 2023-06-20 14:27:10 -04:00
mocks
scenarios [skip e2e] document transaction flows (#20259) 2023-07-31 19:10:50 -01:00
stub
unit-global
env.js [FLASK] snaps@0.36.1-flask.1 (#19939) 2023-07-11 13:50:50 +02:00
merge-coverage.js ci: temporarily disable codecov status checks (#19354) 2023-06-01 10:11:22 -05:00
run-unit-tests.js
setup.js