Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
Signed-off-by: Sargun Vohra <[email protected]>
  • Loading branch information
sargunv committed Jan 9, 2023
1 parent a40fc84 commit 0fbe92b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/yarn-auditer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,30 @@ describe("yarn-auditer", function testYarnAuditer() {
);
}
);
(canRunYarnBerry ? it : it.skip)(
"reports summary with vulnerabilities in yarn berry workspaces with extra-args: --environment production",
async () => {
const summary = await audit(
config({
directory: testDirectory("yarn-berry-workspace"),
levels: { moderate: true },
"extra-args": ["--environment", "production"],
"report-type": "important",
}),
(_summary) => _summary
);
expect(summary).to.eql(
summaryWithDefault({
failedLevelsFound: ["high", "moderate"],
advisoriesFound: ["GHSA-38f5-ghc2-fcmv", "GHSA-rvg8-pwq2-xj7q"],
advisoryPathsFound: [
"GHSA-38f5-ghc2-fcmv|cryo",
"GHSA-rvg8-pwq2-xj7q|base64url",
],
})
);
}
);
it("does not report duplicate paths", async () => {
const summary = await audit(
config({
Expand Down

0 comments on commit 0fbe92b

Please sign in to comment.