Skip to content

Commit

Permalink
test(run): Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Sep 5, 2018
1 parent c6471c5 commit 2adfe51
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions commands/run/__tests__/run-command.test.js
Expand Up @@ -37,6 +37,18 @@ describe("RunCommand", () => {
npmRunScript.stream.mockImplementation(() => Promise.resolve());

describe("in a basic repo", () => {
it("should complain if invoked with an empty script", async () => {
expect.assertions(1);

const testDir = await initFixture("basic");

try {
await lernaRun(testDir)("");
} catch (err) {
expect(err.message).toBe("You must specify a lifecycle script to run");
}
});

it("runs a script in packages", async () => {
const testDir = await initFixture("basic");

Expand Down

0 comments on commit 2adfe51

Please sign in to comment.