Skip to content

Commit

Permalink
Merge pull request #448 from Zack921/master
Browse files Browse the repository at this point in the history
test(isinspect): completed test cases
  • Loading branch information
Zack921 committed May 31, 2021
2 parents c5d1bc5 + 5b7b230 commit 0d64d8a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/core/util/__test__/isInspect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ describe("test inspect env", () => {
expect(isInspect()).toBe(false);
});

test("test isInspect when NODE_OPTIONS === '--inspect=true'", () => {
process.env.NODE_OPTIONS = "--inspect=true";
test("test isInspect when NODE_OPTIONS === '--require=ts-node/register'",
() => {
process.env.NODE_OPTIONS = "--require=ts-node/register";
expect(isInspect()).toBe(false);
});

test("test isInspect when NODE_OPTIONS === '--inspect'", () => {
process.env.NODE_OPTIONS = "--inspect";
expect(isInspect()).toBe(true);
});

Expand Down

0 comments on commit 0d64d8a

Please sign in to comment.