Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
701 B

import testInput from './testInput';
import {
InputTestBatches,
TestInputFunction,
TestInputFunctionOptions,
} from '../../types/TestInputFunction';
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,
});
export default createTestInputFunction;