Skip to content

Commit

Permalink
Make runJest options optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jperl committed Jan 19, 2020
1 parent a953b75 commit ae6c1ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/runJest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type RunJestOptions = {
path?: string;
};

export const runJest = (args: string[] = [], options: RunJestOptions) => {
export const runJest = (args: string[] = [], options: RunJestOptions = {}) => {
/**
* Returns exit code. 0 for success, 1 for failed.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/tests/runJest.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { runJest } from "../src/runJest";

it("runs successful test", async () => {
const exitCode = runJest(["success"], {});
const exitCode = runJest(["success"]);
expect(exitCode).toEqual(0);
});

it("ignores error for failed test", async () => {
const exitCode = runJest(["failure"], {});
const exitCode = runJest(["failure"]);
expect(exitCode).toEqual(1);
});

0 comments on commit ae6c1ad

Please sign in to comment.