Comments (7)
Hi @montella1507, thanks for your report, but this doesn't tell much. A repo with the issue would be helpful.
from jest-preset-angular.
Hello,
ok i will try to simulate it in your example app.
from jest-preset-angular.
@thymikee i have resolved my issue, yet i dont know why it occurs..
my project structure:
/src
app.module.ts
/shared
/models
/app
index.ts
That index.ts was reexported:
export * from './app'
;
it works for every build - ng build, ngc build, aot build.. but with JEST..
it takes "from './app'" as app.module.ts file.. So it is error...
from jest-preset-angular.
Try the latest version of the preset
from jest-preset-angular.
Current:
jest-preset-angular@^2.0.5
i would try and i will let you know.
from jest-preset-angular.
4.0.0-beta.1 works. Thank you :-))
Uff. i have spent 6 hours on everything :-) Reworked imports, tried to get rid of several barrels... Madge tool, ng tool for circullar dependencies :D unfortunately i just had to wait for the new version of preset :-)
from jest-preset-angular.
The fix for issues like this was a part of v3, which was released some time ago. Glad it worked for you :)
from jest-preset-angular.
Related Issues (20)
- [Bug]: Must use import to load ES Module HOT 4
- How to integrate custom global setup with jest-preset-angular/global-setup?
- [Bug]: ESM with TypeScript >= 5.0 hangs forever HOT 12
- [Bug]: Testing Ionic components with jest does not work HOT 1
- [Bug]: Unexpected value 'Module' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation - while Module from library present in transformIgnorePatterns HOT 15
- [Bug]: Slow jest test memory leak HOT 13
- [Bug]: latest zone.js v0.13.2 is causing import error HOT 11
- [Bug]: SyntaxError: The requested module './config' does not provide an export named 'Config' / DownlevelTransform does not work correctly HOT 6
- [Feature]: Ionic 6 - angular 14 setup HOT 1
- [Feature]: Support Angular 16 HOT 5
- Unable to run tests [Bug]: HOT 1
- Angular 17 Support
- [Feature]: Angular 17 Support HOT 2
- [Bug]: ProxyZone not found when using jest functions imported from @jest/globals HOT 1
- [Bug]: Could not parse CSS stylesheet HOT 11
- [Bug]: jest-preset-angular 13.1.4 - `spyOn` no longer works for functions imported with `import * as` HOT 1
- [Feature]: Angular 17 support HOT 5
- [Bug]: Cannot read properties of undefined (reading 'each') of zone-testing HOT 3
- [Bug]: Drop support Angular versions
- [Bug]: Input signals in components cause tests to error out (Angular v17.1.0) HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-preset-angular.