-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for NARN_PUBLISH env variable.
- Loading branch information
1 parent
635dfa9
commit f41fc40
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
const { getNpmArgs } = require("../lib/narn-lib"); | ||
|
||
describe("narn publish", () => { | ||
afterEach(() => { | ||
delete process.env.NARN_PUBLISH; | ||
}); | ||
|
||
it("runs np", () => { | ||
const expected = []; | ||
expected.command = "np"; | ||
expect(getNpmArgs(["publish"])).toEqual(expected); | ||
}); | ||
|
||
it("doesn't run np with correct env set", () => { | ||
process.env.NARN_PUBLISH = "passthrough"; | ||
expect(getNpmArgs(["publish"])).toEqual(["publish"]); | ||
}); | ||
}); |