Skip to content

Problems unit testing controllers and ngRedux  #64

Open
@brent185

Description

@brent185

I recently posted a question on stackoverflow regarding issues i have unit testing controller in an angular/ES6/Redux app. Unit testing actions and reducers is well documented, and quite simple to implement. However, I am having trouble with controllers - specifically with class constructors, DI and connect functions binding of my actions to lexical 'this', etc.

http://stackoverflow.com/questions/35188646/angular-redux-es6-unit-testing-controllers

To keep this brief, I am wondering if one of you could post an example of testing a controller with ngRedux as a constructor param. I would like to mock redux in this scenario, but I am hitting a wall doing this with an ES6 constructor. I dont see this as an issue per se, but it would definitely help those like me that need to ramp up on Redux (and things that are also new like ES6/modules). Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions