refactor(runPrettier): replace multi-.mockRestore() with jest.restoreAllMocks()
This commit is contained in:
1 parent
6f9da6441c
commit
6fa30d9ccf
1 file changed
+1
-9
@@ -62,15 +62,7 @@ function runPrettier(dir, args, options) {
|
||||
process.argv = originalArgv;
|
||||
process.exitCode = originalExitCode;
|
||||
process.stdin.isTTY = originalStdinIsTTY;
|
||||
|
||||
// TODO: use `jest.restoreAllMocks()` once facebook/jest#4436 fixed
|
||||
spiedProcessExit.mockRestore();
|
||||
spiedStdoutWrite.mockRestore();
|
||||
spiedStderrWrite.mockRestore();
|
||||
spiedConsoleLog.mockRestore();
|
||||
spiedConsoleWarn.mockRestore();
|
||||
spiedConsoleError.mockRestore();
|
||||
spiedFsWriteFileSync.mockRestore();
|
||||
jest.restoreAllMocks();
|
||||
}
|
||||
|
||||
return { status, stdout, stderr, write };
|
||||
|
||||
Reference in new issue
Block a user