Mock Depth limited by toSrc
Closed this issue · 4 comments
Hi, thank your for you work, but i encountered an issue with ng-mock-e2e
In the code you use toSrc inside a map function (here : https://github.com/yevhenpavliuk/ng-mock-e2e/blob/master/ng-mock-e2e.js#L191 ) but toSrc has a maximum depth for objects, by default set to 1.
If you dont pass a depth-parameter, it will default to 1. In this case
all objects within an object or an array are converted to undefined.
Therefore when i mock some data, if the object has a depth of more than 1, some data will be undefined
, like this :
$httpBackend.when('GET', '/myendpoint').respond({ levelOne: { levelTwo: 'value'}});
Do you have any ways not to lose the depths of my mocks ? Thanks in advance
same issue here ! 👍
@AlexStef, thank you for reporting the issue! I'll look into it this weekend.
@yevhenpavliuk It works ! Thanks a lot