These are chat archives for AngularClass/NG6-starter

7th
Mar 2016
Steven Myers
@slmyers
Mar 07 2016 22:14
can anyone explain how to test controllers using this boilerplate?
Sergey Protko
@fesor
Mar 07 2016 22:15
@slmyers well... just create instance of controller, and check it's state?
Steven Myers
@slmyers
Mar 07 2016 22:15
err not controllers sorry i meant factories
i'm new my apologies
Sergey Protko
@fesor
Mar 07 2016 22:15
@slmyers first of all, why do you use factory?
you asking about testing services, right?
Steven Myers
@slmyers
Mar 07 2016 22:15
i use a factory to inject data into different components
yes it's a service
something like this
Steven Myers
@slmyers
Mar 07 2016 22:16
oh perfect that's just what i needed
thanks
Sergey Protko
@fesor
Mar 07 2016 22:16
your service is just javascript object
nothing special if you mock all your dependencies
Steven Myers
@slmyers
Mar 07 2016 22:17
yes I can see now
Sergey Protko
@fesor
Mar 07 2016 22:18
this is not perfect illustration, hope it will help
Steven Myers
@slmyers
Mar 07 2016 22:22
it will help i'm sure