-
-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add automocking in vitest (#666)
* feat: add automocking in vitest * fix: integrate eslint and prettier correctly When running the lint command, Eslint was displaying an error and not working. This commit fix this by: - Updating dependencies by running `yarn upgrade` - Setting up `eslint-plugin-prettier` * fix: fix lint error due to dependencies in example
- Loading branch information
Showing
7 changed files
with
5,055 additions
and
6,198 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,7 +1,9 @@ | ||
export function isJest(): boolean { | ||
export function isTest(): boolean { | ||
if (global.process == null) { | ||
// In a WebBrowser/Electron the `process` variable does not exist | ||
return false; | ||
} | ||
return process.env.JEST_WORKER_ID != null; | ||
return ( | ||
process.env.JEST_WORKER_ID != null || process.env.VITEST_WORKER_ID != null | ||
); | ||
} |
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
Oops, something went wrong.