diff --git a/lib/narn-lib.js b/lib/narn-lib.js index a2f309f..ae64c70 100644 --- a/lib/narn-lib.js +++ b/lib/narn-lib.js @@ -146,6 +146,10 @@ exports.getNpmArgs = (narnArgs, isPnpm = false) => { } }); break; + case "info": + npmTarget = "info"; + npmArgs = narnArgs.slice(1); + break; default: npmTarget = "run"; if (narnArgs.length > 1) { diff --git a/test/info.test.js b/test/info.test.js new file mode 100644 index 0000000..a626d95 --- /dev/null +++ b/test/info.test.js @@ -0,0 +1,7 @@ +const { getNpmArgs } = require("../lib/narn-lib"); + +describe("narn info", () => { + it("can lookup package info", () => { + expect(getNpmArgs(["info", "single-spa"])).toEqual(["info", "single-spa"]); + }); +}); diff --git a/test/publish.test.js b/test/publish.test.js index 3290023..da150ba 100644 --- a/test/publish.test.js +++ b/test/publish.test.js @@ -6,6 +6,7 @@ describe("narn publish", () => { }); it("runs np", () => { + delete process.env.NARN_PUBLISH; const expected = []; expected.command = "np"; expect(getNpmArgs(["publish"])).toEqual(expected);