mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-29 17:38:04 +01:00
5b5c165e10
* 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
16 lines
521 B
TypeScript
16 lines
521 B
TypeScript
import type { CustomMatchers } from "./spec";
|
|
|
|
// This declares the types for our custom matchers so that they're recognised by Typescript
|
|
// This file must also be included in the TS compilation (via the tsconfig.json "include" property) to be recognised by
|
|
// vscode
|
|
|
|
/* eslint-disable */
|
|
declare global {
|
|
namespace jest {
|
|
interface Expect extends CustomMatchers {}
|
|
interface Matchers<R> extends CustomMatchers<R> {}
|
|
interface InverseAsymmetricMatchers extends CustomMatchers {}
|
|
}
|
|
}
|
|
/* eslint-enable */
|