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

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-05 22:33:29 -07:00
1 parent 420fd76f60
commit f1e84c28fe
2 files changed
+1 -24

No files matched your search

@@ -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);
});
});
@@ -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 {