1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00
metamask-extension/test
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
..
data Fix #19941 - Correctly show network name and selection when chainIds collide (#19947) 2023-07-14 05:54:02 -02:30
e2e Fix and test log.info calls run for each migration (#20517) 2023-08-18 11:16:42 -02:30
helpers Upgrade assets-controllers to v9 (#19472) 2023-06-09 15:48:48 -05:00
jest Swaps UI update (#19169) 2023-06-15 20:17:21 +02:00
lib feat(srp): add a quiz to the SRP reveal (#19283) 2023-06-20 14:27:10 -04:00
mocks remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
stub Update eth-json-rpc-middleware from v9 to v10 (#17591) 2023-02-27 13:19:08 -03:30
unit-global update ses@0.18.4 (#17521) 2023-04-27 21:31:52 +09:00
env.js Use snaps@0.35.2-flask.1 and snaps@1.0.0-prerelease.1 (#19734) 2023-06-26 19:41:59 +02:00
merge-coverage.js ci: temporarily disable codecov status checks (#19354) 2023-06-01 10:11:22 -05:00
run-unit-tests.js split unit tests (#16455) 2023-01-11 12:23:38 -06:00
setup.js Disable typechecking while running Mocha tests (#17701) 2023-02-12 14:34:35 -07:00