MCPcopy
hub / github.com/jestjs/jest / convertRowToTable

Function convertRowToTable

packages/jest-each/src/table/template.ts:30–36  ·  view source on GitHub ↗
(row: Global.Row, headings: Headings)

Source from the content-addressed store, hash-verified

28}
29
30const convertRowToTable = (row: Global.Row, headings: Headings): Global.Table =>
31 Array.from({length: row.length / headings.length}, (_, index) =>
32 row.slice(
33 index * headings.length,
34 index * headings.length + headings.length,
35 ),
36 );
37
38const convertTableToTemplates = (
39 table: Global.Table,

Callers 1

templateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected