Installs the fake on the current window (replacing an earlier fake) and
announces it, as the real extension does when a page loads. Needs a DOM:
a browser, or a test environment such as jsdom or happy-dom.
// In a unit test (Vitest/Jest with a DOM environment): letfake: FakeWebSign; beforeEach(async () => (fake = awaitinstallFakeWebSign())); afterEach(() =>fake.uninstall());
Example
// In your app, only in development: the import is dropped from production builds. if (import.meta.env.DEV) await (awaitimport("@websign/sdk/testing")).installFakeWebSign();
Throws
without a window, or on a non-local origin without allowAnyOrigin.
Installs the fake on the current
window(replacing an earlier fake) and announces it, as the real extension does when a page loads. Needs a DOM: a browser, or a test environment such as jsdom or happy-dom.