From 12ee84f04e902e930084c7c278882d0998fec2c7 Mon Sep 17 00:00:00 2001 From: Matt Jennings Date: Sun, 7 Apr 2024 19:53:16 -0500 Subject: [PATCH] chore: ensure consistent toEqualImage() resolution when running on hidpi displays (#3018) --- src/spec/_boot.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/spec/_boot.ts b/src/spec/_boot.ts index 3c599a5fb..8ec9accb5 100644 --- a/src/spec/_boot.ts +++ b/src/spec/_boot.ts @@ -4,6 +4,9 @@ ex.Flags.enable('suppress-obsolete-message'); const testsContext = require.context('.', true, /Spec$/); testsContext.keys().forEach(testsContext); +// ensure consistent toEqualImage() resolution when running on hidpi displays +window.devicePixelRatio = 1; + const MemoryReporter = { previousMemory: (window.performance as any).memory, largeMemory: [],