@marketrix.ai/widget 3.8.495 → 3.8.496
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
* `WidgetRenderedSettings`, which omits them, but callers hand this fixture straight to
|
|
9
9
|
* `WidgetSettingsDataSchema.parse()`, which demands the whole wire shape. It is `Valid`, not partial, so
|
|
10
10
|
* `renderWidget` can hand it to `WidgetRoot` without a cast — the fixture really does set every field.
|
|
11
|
+
*
|
|
12
|
+
* `flushMicrotasks` names the common one-microtask-tick wait (`await Promise.resolve()`) explicitly, for
|
|
13
|
+
* tests that need pending promise callbacks to settle before asserting.
|
|
11
14
|
*/
|
|
12
15
|
import type { ValidWidgetConfig, WidgetSettingsData } from '../types';
|
|
16
|
+
export declare const flushMicrotasks: () => Promise<void>;
|
|
13
17
|
type MockWidgetConfig = ValidWidgetConfig & Pick<WidgetSettingsData, 'widget_border_radius' | 'widget_font_size' | 'widget_animation_duration' | 'widget_fade_duration'>;
|
|
14
18
|
export declare function getMockWidgetConfig(overrides?: Partial<MockWidgetConfig>): MockWidgetConfig;
|
|
15
19
|
export {};
|
package/dist/src/test/setup.d.ts
CHANGED
|
@@ -11,5 +11,10 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Every fill is conditional, so a real implementation — a future jsdom, or a per-test override
|
|
13
13
|
* installed before this file — wins.
|
|
14
|
+
*
|
|
15
|
+
* `resetDom` is the shared body-clearing helper for tests that mount outside Testing Library's own
|
|
16
|
+
* render tree (so RTL's automatic per-test cleanup does not reach them) — `replaceChildren()` over
|
|
17
|
+
* `innerHTML = ''` avoids re-parsing a fresh, empty document fragment on every reset.
|
|
14
18
|
*/
|
|
15
19
|
import '@testing-library/jest-dom/vitest';
|
|
20
|
+
export declare function resetDom(): void;
|