From a794ab401db74278fc3b0ae8a1b6455d7c11683d Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Thu, 19 Dec 2024 11:29:56 -0500 Subject: [PATCH] more reverting --- packages/server/lib/screenshots.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/lib/screenshots.ts b/packages/server/lib/screenshots.ts index f2f15d754ba9..024ef60d7800 100644 --- a/packages/server/lib/screenshots.ts +++ b/packages/server/lib/screenshots.ts @@ -10,7 +10,6 @@ import colorString from 'color-string' import sanitize from 'sanitize-filename' import * as plugins from './plugins' import { fs } from './util/fs' -import { stat } from 'fs/promises' let debug = Debug('cypress:server:screenshot') const RUNNABLE_SEPARATOR = ' -- ' @@ -552,7 +551,8 @@ export = { .then((buffer) => { return fs.outputFile(pathToScreenshot, buffer) }).then(() => { - return stat(pathToScreenshot) + // @ts-expect-error TODO: size is not assignable here + return fs.statAsync(pathToScreenshot).get('size') }).then(({ size }) => { const dimensions = getDimensions(details)