fix: improve handling of global File object in uploads tests (#1394)

pull/1315/head
Yordis Prieto 2025-07-29 12:30:39 -04:00 committed by GitHub
parent df63008a94
commit 68ae0d107c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 3 deletions

View File

@ -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 () => {