Skip to content

[Plugin] Porting RSpec's allow syntax for mocks #93

Description

@adaam2

Description

This is one thing that I really miss from RSpec - it would be great if we could somehow permit this kind of syntax:

allow(objectToBeMocked)
  .toReceive(methodName)
  .andReturn(mockedReturnValue)

I don't know if there are technical limitations to this in Jest or not - it would be great to hear everyone's thoughts on this.

Generally, it would be useful if you could provide some more documentation on how to contribute to this project as it's a really great set of plugins (namely: setting up for development of new plugins, best practices etc)

Thanks!
A

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