All files / src/testing using.ts

100% Statements 5/5
50% Branches 1/2
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15            1x 3x 9x 9x 9x        
/**
 * Allows you to provide data to iterate and use for a test.
 *
 * @param {object} values A key used as the description and an array of values.
 * @param {function} func The function.
 */
export const using = (values, func) => {
  for (const key in values) {
    Eif (values.hasOwnProperty(key)) {
      values[key].unshift(key);
      func.apply(null, values[key]);
    }
  }
};