tp / tsaga

Typesafe and lightweight way to write Redux-connected functions with asynchronous side-effects that are easily testable.
Apache License 2.0
8 stars 1 forks source link

Throw error if there are unused value mocks at the end of a test #16

Closed tp closed 5 years ago

tp commented 5 years ago

Already implemented in src/lib/stateBasedTestHelper.ts

  if (mocks.length) {
    console.error(`Unused mocks after the saga completed`, mocks);
    throw new Error(`Unused mocks after the saga completed`);
  }