@reshaped/utilities 3.10.2 → 3.11.0-canary.1
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.
|
@@ -63,16 +63,15 @@ describe("flyout/applyPosition", () => {
|
|
|
63
63
|
expect(result.position).toBe("top");
|
|
64
64
|
expect(content.style.transform).toBe(`translate(150px, ${250 - window.innerHeight}px)`);
|
|
65
65
|
});
|
|
66
|
-
test("
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}).toThrow("Trigger bounds are required");
|
|
66
|
+
test("returns early with position when triggerBounds are missing", () => {
|
|
67
|
+
const result = applyPosition({
|
|
68
|
+
content,
|
|
69
|
+
triggerCoordinates: null,
|
|
70
|
+
position: "top",
|
|
71
|
+
lastUsedPosition: null,
|
|
72
|
+
onDeactivate: vi.fn(),
|
|
73
|
+
});
|
|
74
|
+
expect(result).toEqual({ position: "top" });
|
|
76
75
|
});
|
|
77
76
|
test("applies custom width when provided", () => {
|
|
78
77
|
applyPosition({
|
package/package.json
CHANGED