Skip to content
TypeScript

test(web): keep settings viewport comparison private (#10307)

Julius Marmingef1e84c28fe59
diff --git a/apps/web/src/components/settings/SettingsPanels.logic.test.ts b/apps/web/src/components/settings/SettingsPanels.logic.test.ts
index b99c69ee331..d93db8d970b 100644
--- a/apps/web/src/components/settings/SettingsPanels.logic.test.ts
+++ b/apps/web/src/components/settings/SettingsPanels.logic.test.ts
@@ -14,7 +14,6 @@ import {
formatDiagnosticsDescription,
getChangedBrowserSettingLabels,
getChangedTypographySettingLabels,
- isSamePreviewViewport,
hasChangedBackgroundActivitySettings,
isProjectGroupingEnabled,
projectGroupingModeFromToggle,
@@ -282,25 +281,3 @@ describe("getChangedBrowserSettingLabels", () => {
]);
});
});
-
-describe("isSamePreviewViewport", () => {
- it("separates presets that share a size", () => {
- // Two presets can agree on width and height and still be different
- // entries in the picker, so the id has to take part in the comparison.
- expect(
- isSamePreviewViewport(
- { _tag: "preset", width: 390, height: 844, presetId: "iphone-12-pro" },
- { _tag: "preset", width: 390, height: 844, presetId: "ipad-mini" },
- ),
- ).toBe(false);
- });
-
- it("separates a freeform viewport from a preset of the same size", () => {
- expect(
- isSamePreviewViewport(
- { _tag: "freeform", width: 390, height: 844 },
- { _tag: "preset", width: 390, height: 844, presetId: "iphone-12-pro" },
- ),
- ).toBe(false);
- });
-});
diff --git a/apps/web/src/components/settings/SettingsPanels.logic.ts b/apps/web/src/components/settings/SettingsPanels.logic.ts
index 3ac6bbaa001..5cbcb190a97 100644
--- a/apps/web/src/components/settings/SettingsPanels.logic.ts
+++ b/apps/web/src/components/settings/SettingsPanels.logic.ts
@@ -126,7 +126,7 @@ export type BrowserDefaultSettings = Pick<
* reports every stored viewport as changed — including one that matches the
* default.
*/
-export function isSamePreviewViewport(
+function isSamePreviewViewport(
left: PreviewViewportSetting,
right: PreviewViewportSetting,
): boolean {