File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
packages/react-email/src/cli/utils/preview/hot-reloading Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ const pathToFileForTestingDependencyGraph = path.join(
10
10
'.for-dependency-graph.ts' ,
11
11
) ;
12
12
13
+ vi . mock ( '@babel/traverse' , async ( ) => {
14
+ const traverse = await vi . importActual ( '@babel/traverse' ) ;
15
+ return { default : traverse } ;
16
+ } ) ;
17
+
13
18
test ( 'createDependencyGraph()' , async ( ) => {
14
19
if ( existsSync ( pathToFileForTestingDependencyGraph ) ) {
15
20
await fs . rm ( pathToFileForTestingDependencyGraph ) ;
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from 'node:fs' ;
2
2
import { getImportedModules } from './get-imported-modules' ;
3
3
4
+ vi . mock ( '@babel/traverse' , async ( ) => {
5
+ const traverse = await vi . importActual ( '@babel/traverse' ) ;
6
+ return { default : traverse } ;
7
+ } ) ;
8
+
4
9
describe ( 'getImportedModules()' , ( ) => {
5
10
it ( 'should work with this test file' , async ( ) => {
6
11
const contents = await fs . readFile ( import . meta. filename , 'utf8' ) ;
You can’t perform that action at this time.
0 commit comments