You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm very sorry if this is a simple thing, but I can't get it to work and there doesn't seem to be any documentation on this. I have a component with a service that works fine with keep(), but I want to override one of its methods and return a specific value. I've tried to use keep() and then a mock(), but this does not work.
beforeEach(() => {
return MockBuilder(BoardComponent, SharedModule)
.keep(WordService)
// All other methods disappear after adding this
.mock(WordService, {
checkWordInList: () => true,
});
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm very sorry if this is a simple thing, but I can't get it to work and there doesn't seem to be any documentation on this. I have a component with a service that works fine with keep(), but I want to override one of its methods and return a specific value. I've tried to use keep() and then a mock(), but this does not work.
Beta Was this translation helpful? Give feedback.
All reactions