Skip to content

Commit 24403eb

Browse files
committed
Update tests to match current npm output
1 parent 3fe6857 commit 24403eb

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/test/groovy/com/github/gradle/node/SystemVersion_integTest.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class SystemVersion_integTest extends AbstractIntegTest {
2929
result2.output.contains("Project repositories: 0")
3030

3131
when:
32-
def result3 = build(":npmHelp")
32+
def result3 = build(":npmVersion")
3333

3434
then:
35-
result3.task(":npmHelp").outcome == TaskOutcome.SUCCESS
36-
result3.output.contains("Usage: npm <command>")
35+
result3.task(":npmVersion").outcome == TaskOutcome.SUCCESS
36+
result3.output.contains(" npm: '")
3737

3838
when:
3939
def result4 = build(":npxHelp")

src/test/groovy/com/github/gradle/node/npm/task/NpmInstall_integTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class NpmInstall_integTest extends AbstractIntegTest {
118118
def result = buildAndFail('npmInstall')
119119

120120
then:
121-
result.output.contains('can only install packages with an existing package-lock.json')
121+
result.output.contains('can only install with an existing package-lock.json')
122122
result.task(':npmInstall').outcome == TaskOutcome.FAILED
123123

124124
when:

src/test/resources/fixtures/node-system-version/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ task countRepositories {
1313
}
1414
}
1515

16-
task npmHelp(type: NpmTask) {
17-
npmCommand = ["--help"]
18-
ignoreExitValue = true
16+
task npmVersion(type: NpmTask) {
17+
npmCommand = ["version"]
1918
}
2019

2120
task npxHelp(type: NpxTask) {

0 commit comments

Comments
 (0)