You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a service with a dependency injected though a token and a test for the service, the test fails with a ReferenceError for the injection token depending on the import statement in the service.
Describe the Bug
Given a service with a dependency injected though a token and a test for the service, the test fails with a
ReferenceError
for the injection token depending on the import statement in the service.For example a service...
...with a dependency...
...and a test:
Depending on the import statement for the dependency in the service, the test fails with a
ReferenceError: example_dependency_2 is not defined
.The following import causes the error:
But combining them into a single import (even with type) works as expected:
Minimal Reproduction
https://github.com/raphaelmeyer/angular-builder-jest-import-error
Expected Behavior
I would expect the same behavior from both import statement variants.
Environment
@angular-builders/jest@17.0.3
jest@29.7.0
Additional Context
I just did a quick test with
@angular-devkit/build-angular:jest
instead of@angular-builders/jest:run
. Then the error does not occur.The text was updated successfully, but these errors were encountered: