MCPcopy
hub / github.com/codeceptjs/CodeceptJS / failWhen

Method failWhen

test/data/sandbox/retry_helper.js:4–6  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

2
3class Retry extends Helper {
4 failWhen(fn) {
5 if (fn()) throw new Error('ups, error');
6 }
7
8 waitForFail(fn) {
9 if (fn()) throw new Error('ups, error');

Callers 2

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected