Skip to content

Commit e15778e

Browse files
committed
test: test case reproducing the npm configuration cache issue diffplug#2372
1 parent 8219f37 commit e15778e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin-gradle/src/test/java/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest.java

+9
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,13 @@ void useNpmNextToConfiguredNodePluginFromNodeGradlePlugin() throws Exception {
177177
throw e;
178178
}
179179
}
180+
181+
@Test
182+
public void supportsConfigurationCache() throws Exception {
183+
setFile("build.gradle").toResource("com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_1.gradle");
184+
setFile("test.ts").toResource("npm/prettier/config/typescript.dirty");
185+
final BuildResult spotlessApply = gradleRunner().withArguments("--stacktrace", "--configuration-cache", "spotlessApply").build();
186+
Assertions.assertThat(spotlessApply.getOutput()).contains("BUILD SUCCESSFUL");
187+
assertFile("test.ts").sameAsResource("npm/prettier/config/typescript.configfile_prettier_2.clean");
188+
}
180189
}

0 commit comments

Comments
 (0)