anvil/striker-ui/lib/test_input/createTestInputFunction.ts

23 lines
583 B
TypeScript
Raw Normal View History

2022-08-13 01:06:59 +00:00
import testInput from './testInput';
const createTestInputFunction =
(
tests: InputTestBatches,
{
excludeTestIds: defaultExcludeTestIds = [],
...restDefaultOptions
}: Omit<TestInputFunctionOptions, 'inputs' | 'tests'> = {},
) =>
({
excludeTestIds = [],
...restOptions
}: Parameters<TestInputFunction>[0] = {}): ReturnType<TestInputFunction> =>
testInput({
tests,
excludeTestIds: [...defaultExcludeTestIds, ...excludeTestIds],
...restDefaultOptions,
...restOptions,
});
2022-08-13 01:06:59 +00:00
export default createTestInputFunction;