Skip to content

Commit 7e57f7c

Browse files
committed
test(@angular/build): ensure hash init in i18n inliner tests
The i18n inliner hashes output files which requires the hash utility to be initialized prior to execution. This adds `initializeHash()` to `beforeAll` in `i18n-inliner_spec.ts`. Also removes an unused import in `application-code-bundle.ts`.
1 parent 4d0be68 commit 7e57f7c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/angular/build/src/tools/esbuild/application-code-bundle.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
SERVER_APP_MANIFEST_FILENAME,
2020
SERVER_GENERATED_EXTERNALS,
2121
} from '../../utils/server-rendering/manifest';
22-
import { AngularCompilation, NoopCompilation } from '../angular/compilation';
2322
import { AngularCompilationContext } from './angular/compilation-state';
2423
import { createCompilerPlugin } from './angular/compiler-plugin';
2524
import { ComponentStylesheetBundler } from './angular/component-stylesheets';

packages/angular/build/src/tools/esbuild/i18n-inliner_spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { transform } from 'esbuild';
1010
import fs from 'node:fs/promises';
1111
import os from 'node:os';
1212
import path from 'node:path';
13+
import { initializeHash } from '../../utils/hash';
1314
import { type BuildOutputFile, BuildOutputFileType, createOutputFile } from './bundler-files';
1415
import { I18nInliner } from './i18n-inliner';
1516

@@ -51,6 +52,10 @@ describe('I18nInliner', () => {
5152
return inliner;
5253
}
5354

55+
beforeAll(async () => {
56+
await initializeHash();
57+
});
58+
5459
afterEach(async () => {
5560
await inliner?.close();
5661
inliner = undefined;

0 commit comments

Comments
 (0)