Skip to content

Commit

Permalink
Now that we're all mavenCentral and no jcenter, maybe tests won't…
Browse files Browse the repository at this point in the history
… be flaky and we can close-out #429.
  • Loading branch information
nedtwigg committed Dec 4, 2021
1 parent 22e777b commit 383b827
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package com.diffplug.spotless.kotlin;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.FormatterStep;
Expand All @@ -29,18 +28,15 @@
* causes these problems. The root is still a gradle bug, but in the meantime we don't
* need to hold up *every* PR with this: https://github.com/gradle/gradle/issues/11752
*/
@Disabled
class KtLintStepTest extends ResourceHarness {
@Test
void behavior() throws Exception {
// Must use jcenter (GONE) because `com.andreapivetta.kolor:kolor:0.0.2` isn't available on mavenCentral.
// It is a dependency of ktlint.
FormatterStep step = KtLintStep.create(TestProvisioner.mavenCentral());
StepHarness.forStep(step)
.testResource("kotlin/ktlint/basic.dirty", "kotlin/ktlint/basic.clean")
.testResourceException("kotlin/ktlint/unsolvable.dirty", assertion -> {
assertion.isInstanceOf(AssertionError.class);
assertion.hasMessage("Error on line: 1, column: 1\n" +
assertion.hasMessage("Error on line: 1, column: 2\n" +
"Wildcard import");
});
}
Expand Down

0 comments on commit 383b827

Please sign in to comment.