From 5dff044900f7ab8948f632cd623bcaa48339f2a4 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 31 Mar 2026 18:48:35 +0200 Subject: [PATCH] Update createTestFile to use bytes.buffer directly --- tests/domain/model-import.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/domain/model-import.test.ts b/tests/domain/model-import.test.ts index 2b12f3d2..f01b1970 100644 --- a/tests/domain/model-import.test.ts +++ b/tests/domain/model-import.test.ts @@ -11,7 +11,9 @@ const externalTriangleGltfPath = path.resolve(process.cwd(), "fixtures/assets/ex const externalTriangleBinPath = path.resolve(process.cwd(), "fixtures/assets/external-triangle/triangle.bin"); function createTestFile(bytes: Uint8Array | Buffer, name: string, type: string): File { - return Object.assign(new Blob([bytes], { type }), { + const arrayBuffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength); + + return Object.assign(new Blob([arrayBuffer], { type }), { name, lastModified: Date.now(), webkitRelativePath: ""