From 68ae0d107c023560dd9ccf31521dbf8b250418f2 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Tue, 29 Jul 2025 12:30:39 -0400 Subject: [PATCH] fix: improve handling of global File object in uploads tests (#1394) --- packages/sdk/tests/uploads.test.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/sdk/tests/uploads.test.ts b/packages/sdk/tests/uploads.test.ts index 562ebdfc..00f85a00 100644 --- a/packages/sdk/tests/uploads.test.ts +++ b/packages/sdk/tests/uploads.test.ts @@ -78,8 +78,6 @@ describe('missing File error message', () => { let prevNodeFile: unknown; beforeEach(() => { // The file shim captures the global File object when it's first imported. - // Reset modules before each test so we can test the error thrown when it's undefined. - jest.resetModules(); const buffer = require('node:buffer'); // @ts-ignore prevGlobalFile = globalThis.File; @@ -93,7 +91,6 @@ describe('missing File error message', () => { // @ts-ignore globalThis.File = prevGlobalFile; require('node:buffer').File = prevNodeFile; - jest.resetModules(); }); test('is thrown', async () => {