11package com.github.gradle.node.npm.task
22
33import com.github.gradle.AbstractIntegTest
4+ import com.github.gradle.node.NodeExtension
45import org.gradle.testkit.runner.TaskOutcome
56import org.junit.Rule
67import org.junit.contrib.java.lang.system.EnvironmentVariables
@@ -49,7 +50,7 @@ class NpmTask_integTest extends AbstractIntegTest {
4950
5051 then :
5152 result4. task(" :version" ). outcome == TaskOutcome . SUCCESS
52- result4. output. contains(" > Task :version${ System.lineSeparator()} 6.12.0 " )
53+ result4. output. contains(" > Task :version${ System.lineSeparator()}${ NodeExtension.DEFAULT_NPM_VERSION } " )
5354 }
5455
5556 def ' execute npm command with custom execution configuration and check up-to-date-detection' () {
@@ -95,7 +96,7 @@ class NpmTask_integTest extends AbstractIntegTest {
9596 result4. task(" :npmSetup" ). outcome == TaskOutcome . SKIPPED
9697 result4. task(" :npmInstall" ). outcome == TaskOutcome . UP_TO_DATE
9798 result4. task(" :env" ). outcome == TaskOutcome . SUCCESS
98- result4. output. contains(" Usage: npm < command> " )
99+ result4. output. contains(" Unknown command: \" notExistingCommand \" " )
99100
100101 when :
101102 def result5 = buildAndFail(" :env" , " -DnotExistingCommand=true" )
@@ -105,7 +106,7 @@ class NpmTask_integTest extends AbstractIntegTest {
105106 result5. task(" :npmSetup" ). outcome == TaskOutcome . SKIPPED
106107 result5. task(" :npmInstall" ). outcome == TaskOutcome . UP_TO_DATE
107108 result5. task(" :env" ). outcome == TaskOutcome . FAILED
108- result5. output. contains(" Usage: npm < command> " )
109+ result5. output. contains(" Unknown command: \" notExistingCommand \" " )
109110
110111 when :
111112 def result6 = build(" :env" , " -DoutputFile=true" )
@@ -169,6 +170,6 @@ class NpmTask_integTest extends AbstractIntegTest {
169170
170171 then :
171172 result. task(" :version" ). outcome == TaskOutcome . SUCCESS
172- result. output. contains(" > Task :version${ System.lineSeparator()} 6.12.0 " )
173+ result. output. contains(" > Task :version${ System.lineSeparator()}${ NodeExtension.DEFAULT_NPM_VERSION } " )
173174 }
174175}
0 commit comments