diff --git a/tests/domain/model-import.test.ts b/tests/domain/model-import.test.ts index f01b1970..540feb6e 100644 --- a/tests/domain/model-import.test.ts +++ b/tests/domain/model-import.test.ts @@ -11,7 +11,8 @@ 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 { - const arrayBuffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength); + const arrayBuffer = new ArrayBuffer(bytes.byteLength); + new Uint8Array(arrayBuffer).set(bytes); return Object.assign(new Blob([arrayBuffer], { type }), { name,