Skip to content

Commit 3e0d001

Browse files
committed
dprint.json json.test.ts
1 parent 4f4b8d9 commit 3e0d001

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

dprint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"typescript": {
33
"semiColons": "asi",
44
"lineWidth": 120,
5-
"trailingCommas": "never"
5+
"trailingCommas": "never",
6+
"quoteStyle": "preferDouble"
67
},
78
"json": {
89
"trailingCommas": "never"

test/json.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ suite("assertNoDiff.json", function() {
1515
const obj2 = { firstName: "Captain", lastName: "Picard" }
1616
const expected = `mismatching objects:
1717
18-
${gray("{\n")}${red(" \"firstName\": \"Jean-Luc\",\n")}${green(" \"firstName\": \"Captain\",\n")}${
19-
gray(" \"lastName\": \"Picard\"\n}")
18+
${gray("{\n")}${red(' "firstName": "Jean-Luc",\n')}${green(' "firstName": "Captain",\n')}${
19+
gray(' "lastName": "Picard"\n}')
2020
}`
2121
assert.throws(
2222
function() {
@@ -45,7 +45,7 @@ ${gray("{\n")}${red(" \"firstName\": \"Jean-Luc\",\n")}${green(" \"firstName\"
4545
assertNoDiff.json({ a: 1 }, { a: 2 }, "custom message")
4646
} catch (e) {
4747
const stripped = stripAnsi(e.message)
48-
assert.equal(stripped, "custom message:\n\n{\n \"a\": 2\n \"a\": 1\n}")
48+
assert.equal(stripped, 'custom message:\n\n{\n "a": 2\n "a": 1\n}')
4949
return
5050
}
5151
throw new Error("assertNoDiff.json didn't throw")

0 commit comments

Comments
 (0)