Skip to content

Question: How to call original method on spy after interception #231

@EvilBeaver

Description

@EvilBeaver
when(transportSpy.onServerMessage(anyOfClass(ServerMessage)))
  .thenCall((message: DebuggerMessage) => {
      receivedMessages.push(message);
  });

I'm intercepting call on class using spy. I want to original implementation being called after my spy is called. How to make this? In Java mockito we have thenCallRealMethod() but I can't find it in ts-mockito.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions