From d32ecfe1e4761e791907c6a616f96330db9e4548 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Mon, 5 Oct 2026 11:46:52 +0800 Subject: [PATCH] test(infra): compare wheel bytes without deep matcher traversal --- scripts/primary-runtime/prepare.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/primary-runtime/prepare.spec.ts b/scripts/primary-runtime/prepare.spec.ts index 6f41ac46b4..6100bc2b5b 100644 --- a/scripts/primary-runtime/prepare.spec.ts +++ b/scripts/primary-runtime/prepare.spec.ts @@ -86,7 +86,8 @@ it('fully extracts a large deflate-compressed wheel entry', async () => { const archive = join(root, 'large.whl') await writeFile(archive, zipSync({ 'large.bin': expected }, { level: 6 })) await unpackPrimaryRuntimeWheel(archive, root) - expect(await readFile(join(root, 'large.bin'))).toEqual(expected) + // Native byte equality avoids a per-byte matcher traversal for this 1 MiB expected output. + expect((await readFile(join(root, 'large.bin'))).equals(expected)).toBe(true) } finally { await rm(root, { recursive: true, force: true }) }