UNPKG

@ic-wallet-kit/hpl

Version:
22 lines (21 loc) 737 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.itValidate = void 0; const itForeach_1 = require("../__tests_utils/itForeach"); function itValidate(validForm, validData, test, fn) { it(test.name, async () => { await expect(fn(validForm, validData)).resolves.toBeUndefined(); }); (0, itForeach_1.itForeach)(test.tests, async (test) => { const from = { ...validForm }; const name = test.input.key; from[name] = test.input.value; const data = { ...validData }; if (test.data) { const name = test.data.key; data[name] = test.data.value; } await fn(from, data); }); } exports.itValidate = itValidate;