Skip to content

@UseStoreon decorator - ng test issue #45

Description

@gladziu90

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions