( title: string, headings: Headings, row: Global.Row, )
| 15 | } from './interpolation'; |
| 16 | |
| 17 | export default function template( |
| 18 | title: string, |
| 19 | headings: Headings, |
| 20 | row: Global.Row, |
| 21 | ): EachTests { |
| 22 | const table = convertRowToTable(row, headings); |
| 23 | const templates = convertTableToTemplates(table, headings); |
| 24 | return templates.map((template, index) => ({ |
| 25 | arguments: [template], |
| 26 | title: interpolateVariables(title, template, index), |
| 27 | })); |
| 28 | } |
| 29 | |
| 30 | const convertRowToTable = (row: Global.Row, headings: Headings): Global.Table => |
| 31 | Array.from({length: row.length / headings.length}, (_, index) => |
no test coverage detected