Skip to content

Commit b5313a5

Browse files
committed
Improve coverage
1 parent e4a74c0 commit b5313a5

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

tests/integration/__tests__/config-invalid.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,30 @@ describe("Invalid toml file", () => {
137137
),
138138
});
139139
});
140+
141+
describe("Invalid yaml file", () => {
142+
runCli("cli/config/invalid", [
143+
"--config",
144+
"broken-yaml/.prettierrc.yaml",
145+
"--parser",
146+
"babel",
147+
]).test({
148+
status: 2,
149+
stdout: "",
150+
write: [],
151+
stderr: expect.stringContaining(
152+
/* cSpell:disable */
153+
outdent`
154+
end of the stream or a document separator is expected (2:1)
155+
156+
1 | a
157+
2 | -b
158+
-----^
159+
`
160+
.split("\n")
161+
.map((line) => `[error] ${line}`)
162+
.join("\n"),
163+
/* cSpell:enable */
164+
),
165+
});
166+
});
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a
2+
-b

0 commit comments

Comments
 (0)