Skip to content

Commit 2abfc4a

Browse files
committed
test: Extract helper function toMatchLines()
1 parent 0532300 commit 2abfc4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/CustomMatchers/CustomMatchersForTasks.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ declare global {
2020
export function toToggleLineTo(line: string, expectedLines: string[]) {
2121
const task = fromLine({ line: line });
2222
const receivedLines = task.toggle().map((t) => t.toFileLineString());
23+
return toMatchLines(receivedLines, expectedLines);
24+
}
2325

26+
function toMatchLines(receivedLines: string[], expectedLines: string[]) {
2427
const matches = receivedLines.join('\n') === expectedLines.join('\n');
2528
if (!matches) {
2629
return {

0 commit comments

Comments
 (0)