From dd36475182b5d0f71a02c634e0902d8873cb0554 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:52:28 +0000 Subject: [PATCH] test(@angular/build): initialize hash in persistent load result cache spec Initialize xxhash-wasm before running tests to ensure hashing functions are available during test execution. --- .../src/tools/esbuild/persistent-load-result-cache_spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/angular/build/src/tools/esbuild/persistent-load-result-cache_spec.ts b/packages/angular/build/src/tools/esbuild/persistent-load-result-cache_spec.ts index b99c0a76a74e..f8ecc0611818 100644 --- a/packages/angular/build/src/tools/esbuild/persistent-load-result-cache_spec.ts +++ b/packages/angular/build/src/tools/esbuild/persistent-load-result-cache_spec.ts @@ -10,6 +10,7 @@ import type { OnLoadResult } from 'esbuild'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; +import { initializeHash } from '../../utils/hash'; import type { Cache as PersistentCacheStore } from './cache'; import { type CachedLoadResultEntry, @@ -40,6 +41,10 @@ describe('PersistentLoadResultCache', () => { let tmpDir: string; let file1: string; + beforeAll(async () => { + await initializeHash(); + }); + beforeEach(() => { tmpDir = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'persistent-cache-test-')); file1 = path.join(tmpDir, 'test.js');