Skip to content

Commit 4f4b8d9

Browse files
committed
trimmed-lines.test.ts
1 parent fb8e22c commit 4f4b8d9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/trimmed-lines.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { suite, test } from "node:test"
44
import stripAnsi from "strip-ansi"
55
import * as assertNoDiff from "../src/index"
66

7-
suite("assertNoDiff.trimmedLines", function () {
8-
test("matching data", function () {
7+
suite("assertNoDiff.trimmedLines", function() {
8+
test("matching data", function() {
99
const data = "Jean-Luc Picard"
1010
assertNoDiff.trimmedLines(data, data)
1111
})
1212

13-
test("matching data with surrounding whitespace", function () {
13+
test("matching data with surrounding whitespace", function() {
1414
const obj1 = "foo"
1515
const obj2 = " foo "
1616
assertNoDiff.trimmedLines(
@@ -20,33 +20,33 @@ suite("assertNoDiff.trimmedLines", function () {
2020
)
2121
})
2222

23-
test("mismatching data", function () {
23+
test("mismatching data", function() {
2424
const obj1 = "Jean-Luc\nPicard"
2525
const obj2 = "Captain\nPicard"
2626

2727
const expected = `mismatching lines:
2828
2929
${red("Jean-Luc\n")}${green("Captain\n")}${gray("Picard")}`
30-
assert.throws(function () {
30+
assert.throws(function() {
3131
assertNoDiff.trimmedLines(obj2, obj1)
3232
}, new Error(expected))
3333
})
3434

35-
test("no expected value", function () {
36-
assert.throws(function () {
35+
test("no expected value", function() {
36+
assert.throws(function() {
3737
// @ts-ignore
3838
assertNoDiff.trimmedLines("foo")
3939
}, new Error("AssertNoDiff: expected value not provided"))
4040
})
4141

42-
test("no actual value", function () {
43-
assert.throws(function () {
42+
test("no actual value", function() {
43+
assert.throws(function() {
4444
// @ts-ignore
4545
assertNoDiff.trimmedLines()
4646
}, new Error("AssertNoDiff: actual value not provided"))
4747
})
4848

49-
test("custom error message", function () {
49+
test("custom error message", function() {
5050
try {
5151
assertNoDiff.trimmedLines("one", "two", "custom message")
5252
} catch (e) {
@@ -57,7 +57,7 @@ ${red("Jean-Luc\n")}${green("Captain\n")}${gray("Picard")}`
5757
throw new Error("assertNoDiff.trimmedLines didn't throw")
5858
})
5959

60-
test("diffing empty strings", function () {
60+
test("diffing empty strings", function() {
6161
assertNoDiff.trimmedLines("", "", "should allow diffing empty strings")
6262
})
6363
})

0 commit comments

Comments
 (0)