Skip to content

Commit f1e84c2

Browse files
test(web): keep settings viewport comparison private (pingdotgg#10307)
1 parent 420fd76 commit f1e84c2

2 files changed

Lines changed: 1 addition & 24 deletions

File tree

‎apps/web/src/components/settings/SettingsPanels.logic.test.ts‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
formatDiagnosticsDescription,
1515
getChangedBrowserSettingLabels,
1616
getChangedTypographySettingLabels,
17-
isSamePreviewViewport,
1817
hasChangedBackgroundActivitySettings,
1918
isProjectGroupingEnabled,
2019
projectGroupingModeFromToggle,
@@ -282,25 +281,3 @@ describe("getChangedBrowserSettingLabels", () => {
282281
]);
283282
});
284283
});
285-
286-
describe("isSamePreviewViewport", () => {
287-
it("separates presets that share a size", () => {
288-
// Two presets can agree on width and height and still be different
289-
// entries in the picker, so the id has to take part in the comparison.
290-
expect(
291-
isSamePreviewViewport(
292-
{ _tag: "preset", width: 390, height: 844, presetId: "iphone-12-pro" },
293-
{ _tag: "preset", width: 390, height: 844, presetId: "ipad-mini" },
294-
),
295-
).toBe(false);
296-
});
297-
298-
it("separates a freeform viewport from a preset of the same size", () => {
299-
expect(
300-
isSamePreviewViewport(
301-
{ _tag: "freeform", width: 390, height: 844 },
302-
{ _tag: "preset", width: 390, height: 844, presetId: "iphone-12-pro" },
303-
),
304-
).toBe(false);
305-
});
306-
});

‎apps/web/src/components/settings/SettingsPanels.logic.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export type BrowserDefaultSettings = Pick<
126126
* reports every stored viewport as changed — including one that matches the
127127
* default.
128128
*/
129-
export function isSamePreviewViewport(
129+
function isSamePreviewViewport(
130130
left: PreviewViewportSetting,
131131
right: PreviewViewportSetting,
132132
): boolean {

0 commit comments

Comments
 (0)