Speed up large buffer assertions (Refs #101)

This commit is contained in:
2026-10-09 16:58:41 -04:00
parent 15fb90200a
commit 4c1f2cdb8f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -77,8 +77,8 @@ it('shares bytes across versions, staged copies and commands, and scopes downloa
expect( expect(
Buffer.from( Buffer.from(
await GET({ request: request(credential), params: { sha256: hash } }).arrayBuffer() await GET({ request: request(credential), params: { sha256: hash } }).arrayBuffer()
) ).equals(content)
).toEqual(content); ).toBe(true);
expect(() => GET({ request: request(otherCredential), params: { sha256: hash } })).toThrow(); expect(() => GET({ request: request(otherCredential), params: { sha256: hash } })).toThrow();
closeDb(); closeDb();
expect(hosts.getHostOperation(op.id)?.payload).toEqual(payload); expect(hosts.getHostOperation(op.id)?.payload).toEqual(payload);
+1 -1
View File
@@ -28,7 +28,7 @@ it('returns metadata without plugin bytes and lists many artifacts in two querie
targetRelPath: 'plugin.dll', targetRelPath: 'plugin.dll',
content content
}).version.id; }).version.id;
expect(getVersionContent(id)).toEqual(content); expect(getVersionContent(id)?.equals(content)).toBe(true);
expect(getVersion(id)).not.toHaveProperty('content'); expect(getVersion(id)).not.toHaveProperty('content');
expect(getLatestVersion(getVersion(id)!.script_id)).not.toHaveProperty('content'); expect(getLatestVersion(getVersion(id)!.script_id)).not.toHaveProperty('content');
expect(listVersions(getVersion(id)!.script_id)[0]).not.toHaveProperty('content'); expect(listVersions(getVersion(id)!.script_id)[0]).not.toHaveProperty('content');