Reputation: 51
Please help.
I think I defined test configs right.
But this throws Provider error for LayoutService.
Upvotes: 0
Views: 927
Reputation: 91
createSpyObj
has the following description from the
Jasmine documentation:
createSpyObj(baseName, methodNames, propertyNames)
The method takes as arguments the name of the Service to be mocked, and the second argument is an array of all the methods inside that class that needs to be mocked.
You should pass to your spy object the original service name and methods that are used by your code.
spyLayoutService = jasmine.createSpyObj('CsLayoutService', ['...'])
Upvotes: 1