-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Labels
angular/build:unit-testarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Command
test
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
A new vitest-based @angular/builder:unit-test
builder doesn't respect outputHashing: "media"
option. Because of this if the project contains assets with the same name it's not possible to run unit tests without making their names unique.
Minimal Reproduction
Clone the reproduction repo (https://github.com/th0r/ng-vitest-output-hashing-bug) and run npm i && npm run test
. You'll see the following error:
[ERROR] Two output files share the same path but have different contents: media/bg.png [plugin angular-compiler]
It shouldn't happen as the test
configuration uses the development
build config which contains the "outputHashing": "media"
option.
Exception or Error
[ERROR] Two output files share the same path but have different contents: media/bg.png [plugin angular-compiler]
Your Environment
Angular CLI: 20.2.0
Node: 22.16.0
Package Manager: npm 10.9.3
OS: darwin arm64
Angular: 20.2.1
... common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------
@angular-devkit/architect 0.2002.0
@angular-devkit/core 20.2.0
@angular-devkit/schematics 20.2.0
@angular/build 20.2.0
@angular/cli 20.2.0
@schematics/angular 20.2.0
rxjs 7.8.2
typescript 5.9.2
zone.js 0.15.1
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
angular/build:unit-testarea: @angular/buildfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix