Skip to content

Commit 4453606

Browse files
authored
Test forwarding of options to diff (#81)
1 parent 380450e commit 4453606

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

test/chars.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ ${red("Je")}${green("C")}${gray("a")}${green("ptai")}${gray("n")}${red("-Luc")}$
5252
test("diffing against empty strings", () => {
5353
assertNoDiff.chars("", "")
5454
})
55+
56+
test("options", () => {
57+
assertNoDiff.chars("aaa", "AAA", "should be similar", { ignoreCase: true })
58+
})
5559
})

test/json.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,8 @@ ${gray("{\n")}${red(' "firstName": "Jean-Luc",\n')}${green(' "firstName": "Cap
5454
test("diffing empty objects", () => {
5555
assertNoDiff.json({}, {})
5656
})
57+
58+
test("options", () => {
59+
assertNoDiff.json("aaa", "AAA", "should be similar", { ignoreCase: true })
60+
})
5761
})

test/trimmed-lines.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,8 @@ ${red("Jean-Luc\n")}${green("Captain\n")}${gray("Picard")}`
6060
test("diffing empty strings", () => {
6161
assertNoDiff.trimmedLines("", "", "should allow diffing empty strings")
6262
})
63+
64+
test("options", () => {
65+
assertNoDiff.trimmedLines("aaa", "AAA", "should be similar", { ignoreCase: true })
66+
})
6367
})

test/words-with-space.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,8 @@ ${green(" ")}${gray("foo bar")}`
6464
test("empty strings", () => {
6565
assertNoDiff.wordsWithSpace("", "", "should allow diffing empty strings")
6666
})
67+
68+
test("options", () => {
69+
assertNoDiff.wordsWithSpace("aaa", "AAA", "should be similar", { ignoreCase: true })
70+
})
6771
})

0 commit comments

Comments
 (0)