1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +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 remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
scenarios [skip e2e] document transaction flows (#20259) 2023-07-31 19:10:50 -01: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 [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 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