diff --git a/tests/acceptance/modelArtifactCli.test.ts b/tests/acceptance/modelArtifactCli.test.ts index 0579cd9976e..35d9f48f1e6 100644 --- a/tests/acceptance/modelArtifactCli.test.ts +++ b/tests/acceptance/modelArtifactCli.test.ts @@ -994,13 +994,9 @@ cliTest( ); const emptyGgufHeader = ggufFixture({ tensors: [], metadata: [] }); const alignedOffset = Math.ceil(emptyGgufHeader.header.length / 32) * 32; - const emptyGguf = Buffer.concat([ - emptyGgufHeader.header, - Buffer.alloc(alignedOffset - emptyGgufHeader.header.length), - ]); for (const [name, bytes] of [ ["optional.safetensors", safetensors.bytes], - ["empty.gguf", emptyGguf], + ["empty.gguf", emptyGgufHeader.bytes], ] as const) { const path = join(root, name); await writeFile(path, bytes); diff --git a/tests/boundary/model/modelArtifact.test.ts b/tests/boundary/model/modelArtifact.test.ts index f9391b50c56..98a4fff1762 100644 --- a/tests/boundary/model/modelArtifact.test.ts +++ b/tests/boundary/model/modelArtifact.test.ts @@ -267,11 +267,7 @@ it.each([8, 24, 40])( it("aligns the GGUF data section after an empty tensor directory", async () => { const base = ggufFixture({ tensors: [], metadata: [] }); const dataOffset = Math.ceil(base.header.length / 32) * 32; - const bytes = Buffer.concat([ - base.header, - Buffer.alloc(dataOffset - base.header.length), - ]); - const report = await readFixtureHeader(bytes); + const report = await readFixtureHeader(base.bytes); expect(report.tensors).toEqual([]); expect(report.tensor_data_offset).toBe(dataOffset); expect(report.artifact.header_length).toBe(base.header.length);