1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-24 03:32:51 +02:00
bitwarden-browser/libs/common/spec/matchers
Matt Gibson 5b5c165e10
[PM-8847] Delay browser local storage operations during reseed (#9536)
* Define matchers to test promise fulfillment

These are useful for validating that promises depend on other events prior to fulfilling.

* Expose custom matchers to jest projects

Team-specific projects are not touched here to try and reduce review burden.

* Block browser local operations awaiting reseed

This should closes a narrow race condition resulting from storage operations during a reseed event.

* Import from barrel file

This might fix the failing test, but I'm not sure _why_

* Document helper methods

* Validate as few properties as possible per test

* Simplify expected value representation

* Allow waiting in promise matchers

* Specify resolution times in promise orchestration tests.

* Test behavior triggering multiple reseeds.

* Fix typo

* Avoid testing implementation details

* Clear reseed on startup

in case a previous process was aborted in the middle of a reseed.

* Correct formatting
2024-07-19 16:12:29 -04:00
..
index.ts [PM-8847] Delay browser local storage operations during reseed (#9536) 2024-07-19 16:12:29 -04:00
promise-fulfilled.spec.ts [PM-8847] Delay browser local storage operations during reseed (#9536) 2024-07-19 16:12:29 -04:00
promise-fulfilled.ts [PM-8847] Delay browser local storage operations during reseed (#9536) 2024-07-19 16:12:29 -04:00
to-almost-equal.spec.ts Ps/pm 5965/better config polling (#8325) 2024-03-27 10:03:09 -07:00
to-almost-equal.ts Ps/pm 5965/better config polling (#8325) 2024-03-27 10:03:09 -07:00
to-equal-buffer.spec.ts [PM-2132] Move all specs to the src directory (#5367) 2023-05-09 11:27:09 +02:00
to-equal-buffer.ts [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00