Skip to content

Commit 873cc58

Browse files
committed
lintify PrettierFormatterStep (tests only)
1 parent cb9cbcd commit 873cc58

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

testlib/src/test/java/com/diffplug/spotless/npm/PrettierFormatterStepTest.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,18 @@ void verifyPrettierErrorMessageIsRelayed() throws Exception {
136136
npmPathResolver(),
137137
new PrettierConfig(null, ImmutableMap.of("parser", "postcss")));
138138
try (StepHarnessWithFile stepHarness = StepHarnessWithFile.forStep(this, formatterStep)) {
139-
stepHarness.testResourceExceptionMsg("npm/prettier/filetypes/scss/scss.dirty").isEqualTo(
140-
"Unexpected response status code at /prettier/format [HTTP 500] -- (Error while formatting: Error: Couldn't resolve parser \"postcss\")");
139+
stepHarness.expectLintsOfResource("npm/prettier/filetypes/scss/scss.dirty")
140+
.toBe("1-35 prettier-format(prettier-format) com.diffplug.spotless.npm.SimpleRestClient$SimpleRestResponseException: Unexpected response status code at /prettier/format [HTTP 500] -- (Error while formatting: Error: Couldn't resolve parser \"postcss\")",
141+
"\tat com.diffplug.spotless.npm.SimpleRestClient.postJson(SimpleRestClient.java:72)",
142+
"\tat com.diffplug.spotless.npm.SimpleRestClient.postJson(SimpleRestClient.java:46)",
143+
"\tat com.diffplug.spotless.npm.PrettierRestService.format(PrettierRestService.java:46)",
144+
"\tat com.diffplug.spotless.npm.PrettierFormatterStep$PrettierFilePathPassingFormatterFunc.applyWithFile(PrettierFormatterStep.java:125)",
145+
"\tat com.diffplug.spotless.FormatterFunc$NeedsFile.apply(FormatterFunc.java:174)",
146+
"\tat com.diffplug.spotless.FormatterFunc$Closeable$1.apply(FormatterFunc.java:73)",
147+
"\tat com.diffplug.spotless.FormatterStepEqualityOnStateSerialization.format(FormatterStepEqualityOnStateSerialization.java:49)",
148+
"\tat com.diffplug.spotless.LintState.of(LintState.java:135)",
149+
"\tat com.diffplug.spotless.LintState.of(LintState.java:92)",
150+
"(... and more)");
141151
}
142152
}
143153
}

0 commit comments

Comments
 (0)