From 4c1f2cdb8f4d53a42b86a275e6285c94f20e740c Mon Sep 17 00:00:00 2001 From: Josh Wright Date: Fri, 9 Oct 2026 16:58:41 -0400 Subject: [PATCH] Speed up large buffer assertions (Refs #101) --- tests/unit/file-blobs.test.ts | 4 ++-- tests/unit/library-metadata.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/file-blobs.test.ts b/tests/unit/file-blobs.test.ts index 886547a..cc93d38 100644 --- a/tests/unit/file-blobs.test.ts +++ b/tests/unit/file-blobs.test.ts @@ -77,8 +77,8 @@ it('shares bytes across versions, staged copies and commands, and scopes downloa expect( Buffer.from( await GET({ request: request(credential), params: { sha256: hash } }).arrayBuffer() - ) - ).toEqual(content); + ).equals(content) + ).toBe(true); expect(() => GET({ request: request(otherCredential), params: { sha256: hash } })).toThrow(); closeDb(); expect(hosts.getHostOperation(op.id)?.payload).toEqual(payload); diff --git a/tests/unit/library-metadata.test.ts b/tests/unit/library-metadata.test.ts index 9384576..8c153a9 100644 --- a/tests/unit/library-metadata.test.ts +++ b/tests/unit/library-metadata.test.ts @@ -28,7 +28,7 @@ it('returns metadata without plugin bytes and lists many artifacts in two querie targetRelPath: 'plugin.dll', content }).version.id; - expect(getVersionContent(id)).toEqual(content); + expect(getVersionContent(id)?.equals(content)).toBe(true); expect(getVersion(id)).not.toHaveProperty('content'); expect(getLatestVersion(getVersion(id)!.script_id)).not.toHaveProperty('content'); expect(listVersions(getVersion(id)!.script_id)[0]).not.toHaveProperty('content');