Skip to content

Commit

Permalink
feat: warning when jest already been patched by Zone
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaLiPassion committed Jan 31, 2020
1 parent 68c42b1 commit 2771812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zone-patch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ if (jest === undefined) {
);
}
if (jest['__zone_patch__'] === true) {
throw new Error("'jest' has already been patched with 'Zone'.");
console.warn("'jest' has already been patched with 'Zone'.");
return;
}

jest['__zone_patch__'] = true;
Expand Down

0 comments on commit 2771812

Please sign in to comment.