mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Fix undefined error when adding scoped package on yarn, npm or npx
This commit is contained in:
parent
b57cc11157
commit
9e1c90a914
7 changed files with 41 additions and 3 deletions
|
|
@ -27,6 +27,14 @@ describe("standardPnpmArgumentParser", () => {
|
|||
assert.deepEqual(result, [{ name: "axios", version: "latest" }]);
|
||||
});
|
||||
|
||||
it("should return the package in the format @vercel/otel", () => {
|
||||
const args = ["@vercel/otel"];
|
||||
|
||||
const result = parsePackagesFromArguments(args);
|
||||
|
||||
assert.deepEqual(result, [{ name: "@vercel/otel", version: "latest" }]);
|
||||
});
|
||||
|
||||
it("should return the package with latest tag if the version is absent and package starts with @", () => {
|
||||
const args = ["@aikidosec/package-name"];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue