drashland / rhum

A test double library
https://drash.land/rhum
MIT License
92 stars 5 forks source link

feat: mock.toBeCalledWithoutArgs() #167

Open crookse opened 2 years ago

crookse commented 2 years ago

Summary

What:

Spies have .verify(...).toBeCalledWithoutArgs(). Mocks should use this logic in the .expects(...) method chaining.

Why:

Would be nice to create an expectation on a mock that a method was called with args.

Acceptance Criteria

Below is a list of tasks that must be completed before this issue can be closed.

Example Pseudo Code (for implementation)

const mock = Mock(...).create();

mock.expects("someMethod").toBeCalledWithoutArgs();

mock.verifyExpectations();
crookse commented 2 years ago

i still need to document this