Skip to content

1.3.6 - directChildOnly

Compare
Choose a tag to compare
@theKashey theKashey released this 25 Jul 12:55
· 248 commits to master since this release

Sometimes you have to mock only directly used modules, or direct children. It was possible with relative plugin, but it was not flexible.

New API:

  rewiremock('somemodule')
     .with(stub)
     .directChildOnly()

As result somemodule will be mocked only as a top level dependency. If not - no mocking will occurs.