Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@UseStoreon decorator - ng test issue #45

Open
gladziu90 opened this issue Feb 9, 2021 · 0 comments
Open

@UseStoreon decorator - ng test issue #45

gladziu90 opened this issue Feb 9, 2021 · 0 comments

Comments

@gladziu90
Copy link
Contributor

gladziu90 commented Feb 9, 2021

angular v.11
Ivy enabled, decorators works seamlessly in the application.

Hovewer when running unit tests 'ng test' I get the error:

storeon-angular.js:138 Uncaught TypeError: Cannot read property 'factory' of undefined
at :9876/karma_webpack/webpack:/node_modules/@storeon/angular/ivy_ngcc/fesm2015/storeon-angular.js:138
at __decorate (:9876/karma_webpack/webpack:/node_modules/tslib/tslib.es6.js:56)
at Module.Sy1n (:9876/karma_webpack/webpack:/src/app/app.component.ts:39)
at webpack_require (:9876/karma_webpack/webpack:/webpack/bootstrap:79)
at Module.eQIV (main.js:1389)
at webpack_require (:9876/karma_webpack/webpack:/webpack/bootstrap:79)
at webpackContext (:9876/karma_webpack/webpack:/src sync .spec.ts$:8)
at Array.map ()
at Module.CB3P (:9876/karma_webpack/webpack:/src/test.ts:29)
at webpack_require (:9876/karma_webpack/webpack:/webpack/bootstrap:79)

any tips/ideas on how can I test components when using the @UseStoreon decorator?

https://github.com/storeon/angular/blob/master/projects/ng-storeon/src/lib/storeon.decorator.ts#L17

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant