-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
449457d
commit c6f131f
Showing
3 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
src/Microsoft.ComponentDetection.Detectors/pnpm/Contracts/PnpmYamlVersion.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -749,8 +749,10 @@ public async Task TestPnpmDetector_V9_GoodLockVersion_SkipsFileAndLinkDependenci | |
dependencies: | ||
sampleIndirectDependency: 3.3.3 | ||
sampleIndirectDependency2: 2.2.2 | ||
'file://../sampleFile': 'link:../\\' | ||
[email protected]: {} | ||
[email protected]: {} | ||
'file://../sampleFile@link:../': {} | ||
"; | ||
|
||
var (scanResult, componentRecorder) = await this.DetectorTestUtility | ||
|
@@ -780,4 +782,30 @@ public async Task TestPnpmDetector_V9_GoodLockVersion_SkipsFileAndLinkDependenci | |
indirectDependencyComponent2.Component.Id, | ||
parentComponent => parentComponent.Name == "sampleDependency"); | ||
} | ||
|
||
[TestMethod] | ||
public async Task TestPnpmDetector_V9_GoodLockVersion_MissingSnapshotsSuccess() | ||
{ | ||
var yamlFile = @" | ||
lockfileVersion: '9.0' | ||
settings: | ||
autoInstallPeers: true | ||
excludeLinksFromLockfile: false | ||
importers: | ||
.: | ||
dependencies: | ||
SampleLinkDependency: | ||
specifier: workspace:* | ||
version: link:SampleLinkDependency | ||
"; | ||
|
||
var (scanResult, componentRecorder) = await this.DetectorTestUtility | ||
.WithFile("pnpm-lock.yaml", yamlFile) | ||
.ExecuteDetectorAsync(); | ||
|
||
scanResult.ResultCode.Should().Be(ProcessingResultCode.Success); | ||
|
||
var detectedComponents = componentRecorder.GetDetectedComponents(); | ||
detectedComponents.Should().BeEmpty(); | ||
} | ||
} |