Skip to content

Commit

Permalink
test(node): Merge NpmVersionUrlFunTest into NpmFunTest
Browse files Browse the repository at this point in the history
The version URL test case is similar to the test cases in `NpmFunTest`,
so move it there for consistency.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau authored and sschuberth committed Sep 18, 2024
1 parent 01ca824 commit b0bd418
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 48 deletions.
12 changes: 12 additions & 0 deletions plugins/package-managers/node/src/funTest/kotlin/NpmFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,17 @@ class NpmFunTest : WordSpec({

result.withInvariantIssues() shouldBe expectedResult.withInvariantIssues()
}

"resolve dependencies with URLs as versions correctly" {
val definitionFile = getAssetFile("projects/synthetic/npm-version-urls/package.json")
val expectedResultFile = getAssetFile("projects/synthetic/npm-version-urls-expected-output.yml")
val expectedResult = patchExpectedResult(expectedResultFile, definitionFile)
.fromYaml<ProjectAnalyzerResult>()

val result = create("NPM", allowDynamicVersions = true)
.resolveSingleProject(definitionFile, resolveScopes = true)

result.withInvariantIssues().toYaml() shouldBe expectedResult.withInvariantIssues().toYaml()
}
}
})

This file was deleted.

0 comments on commit b0bd418

Please sign in to comment.