Commit 79fa953 1 parent f81a47e commit 79fa953 Copy full SHA for 79fa953
File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ const init = jest . fn ( )
2
+ jest . mock ( '@DOSDelete/digitalOceanSpacesDelete.ts' , ( ) => ( {
3
+ __esModule : true , // this property makes it work
4
+ default : init ,
5
+ } ) )
6
+
7
+ describe ( 'DOSDelete index' , ( ) => {
8
+ test ( 'should call init' , async ( ) => {
9
+ require ( '@DOSDelete/index.ts' )
10
+ expect ( init ) . toHaveBeenCalledTimes ( 1 )
11
+ } )
12
+ } )
Original file line number Diff line number Diff line change
1
+ const mockInit = jest . fn ( )
2
+ jest . mock ( '@DOSUpload/digitalOceanSpacesUpload.ts' , ( ) => ( {
3
+ __esModule : true , // this property makes it work
4
+ default : mockInit ,
5
+ } ) )
6
+
7
+ describe ( 'DOSUpload index' , ( ) => {
8
+ test ( 'should call init' , async ( ) => {
9
+ require ( '@DOSUpload/index.ts' )
10
+ expect ( mockInit ) . toHaveBeenCalledTimes ( 1 )
11
+ } )
12
+ } )
You can’t perform that action at this time.
0 commit comments