From da80443796f7693224e1391c5848f736cf891e17 Mon Sep 17 00:00:00 2001 From: pedr Date: Tue, 4 Mar 2025 08:58:57 -0300 Subject: [PATCH] Chore: Remove file created during automated test (#11915) --- packages/lib/shim-init-node.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/lib/shim-init-node.test.ts b/packages/lib/shim-init-node.test.ts index cc98d91a0d..30527c2910 100644 --- a/packages/lib/shim-init-node.test.ts +++ b/packages/lib/shim-init-node.test.ts @@ -1,7 +1,7 @@ const { shimInit } = require('./shim-init-node'); import shim from './shim'; -import { setupDatabaseAndSynchronizer, supportDir } from './testing/test-utils'; +import { createTempDir, setupDatabaseAndSynchronizer, supportDir } from './testing/test-utils'; import { copyFile } from 'fs-extra'; describe('shim-init-node', () => { @@ -19,8 +19,11 @@ describe('shim-init-node', () => { }); test('should preserve the file extension if one is provided regardless of the mime type', async () => { + const tempDir = await createTempDir(); + const originalFilePath = `${supportDir}/valid_pdf_without_ext`; - const fileWithDifferentExtension = `${originalFilePath}.mscz`; + const fileWithDifferentExtension = `${tempDir}/valid_pdf.mscz`; + await copyFile(originalFilePath, fileWithDifferentExtension); const resource = await shim.createResourceFromPath(fileWithDifferentExtension);