Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
throw asyncError;
}
return dispatch({
asyncError,
fn,
mode,
name: 'add_test',
testName,
timeout,
});
};
test.each = bindEach(test);
only.each = bindEach(only);
skip.each = bindEach(skip);
test.only = only;
test.skip = skip;
return test;
})();
asyncError.message = `Invalid second argument, ${fn}. It must be a callback function.`;
throw asyncError;
}
return dispatch({
asyncError,
fn,
mode,
name: 'add_test',
testName,
timeout,
});
};
test.each = bindEach(test);
only.each = bindEach(only);
skip.each = bindEach(skip);
test.only = only;
test.skip = skip;
return test;
})();
const describe = (() => {
const describe = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, describe);
const only = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, only, 'only');
const skip = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, skip, 'skip');
describe.each = bindEach(describe, false);
only.each = bindEach(only, false);
skip.each = bindEach(skip, false);
describe.only = only;
describe.skip = skip;
return describe;
})();
const describe = (() => {
const describe = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, describe);
const only = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, only, 'only');
const skip = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, skip, 'skip');
describe.each = bindEach(describe, false);
only.each = bindEach(only, false);
skip.each = bindEach(skip, false);
describe.only = only;
describe.skip = skip;
return describe;
})();
const describe = (() => {
const describe = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, describe);
const only = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, only, 'only');
const skip = (blockName: Circus.BlockName, blockFn: Circus.BlockFn) =>
_dispatchDescribe(blockFn, blockName, skip, 'skip');
describe.each = bindEach(describe, false);
only.each = bindEach(only, false);
skip.each = bindEach(skip, false);
describe.only = only;
describe.skip = skip;
return describe;
})();
throw asyncError;
}
return dispatch({
asyncError,
fn,
mode,
name: 'add_test',
testName,
timeout,
});
};
test.each = bindEach(test);
only.each = bindEach(only);
skip.each = bindEach(skip);
test.only = only;
test.skip = skip;
return test;
})();