File tree 4 files changed +12
-4
lines changed
4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 3
3
* @author TheJaredWilcurt
4
4
*/
5
5
6
- const childProcess = jest . requireActual ( 'child_process' ) ;
6
+ import { vi } from "vitest" ;
7
+
8
+ const childProcess = await vi . importActual ( 'child_process' ) ;
7
9
8
10
const childProcessMock = Object . assign ( { } , childProcess , {
9
11
execSync : jest . fn ( ( executableAndArgs ) => {
Original file line number Diff line number Diff line change 3
3
* @author TheJaredWilcurt
4
4
*/
5
5
6
- const fs = jest . requireActual ( 'fs' ) ;
6
+ import { vi } from "vitest" ;
7
+
8
+ const fs = await vi . importActual ( 'fs' ) ;
7
9
8
10
const fsMock = Object . assign ( { } , fs , {
9
11
writeFileSync : jest . fn ( ( file ) => {
Original file line number Diff line number Diff line change 3
3
* @author TheJaredWilcurt
4
4
*/
5
5
6
- const os = jest . requireActual ( 'os' ) ;
6
+ import { vi } from "vitest" ;
7
+
8
+ const os = await vi . importActual ( 'os' ) ;
7
9
8
10
const osMock = Object . assign ( { } , os , {
9
11
homedir : function ( ) {
Original file line number Diff line number Diff line change 3
3
* @author TheJaredWilcurt
4
4
*/
5
5
6
- const path = jest . requireActual ( 'path' ) ;
6
+ import { vi } from "vitest" ;
7
+
8
+ const path = await vi . importActual ( 'path' ) ;
7
9
8
10
const pathMock = Object . assign ( { } , path , {
9
11
sep : '/'
You can’t perform that action at this time.
0 commit comments