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
{{ message }}
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
In the polyfills.ts file, comment the import 'core-js/es7/reflect'; line as it is mentioned that :
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
// import 'core-js/es7/reflect';
Then execute unit tests. Tests where a provider (the system under test, or any other class) has a injected dependency will fail with a message indicating that it can resolve all parameter for the class. It is not because its dependencies are not registered in the testing module, but because it can not read metadata of the class and so determine the dependant classes.
The log given by the failure
Error: Can't resolve all parameters for MyService: (?). in http://localhost:9876/_karma_webpack_/vendor.bundle.js (line 20595)
syntaxError@http://localhost:9876/_karma_webpack_/vendor.bundle.js:20595:34
../../../compiler/esm5/compiler.js/CompileMetadataResolver.prototype._getDependenciesMetadata@http://localhost:9876/_karma_webpack_/vendor.bundle.js:35802:35
Desired functionality
The polyfills.ts should mention for the es7/reflect polyfill that unit tests are not run in AOT mode.