@@ -52,7 +52,8 @@ describe('getCacheKey', () => {
52
52
readFileSync : ( ) => 'new this file' ,
53
53
} ) ) ;
54
54
55
- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
55
+ const { createTransformer} =
56
+ require ( '../index' ) as typeof import ( '../index' ) ;
56
57
57
58
const newCacheKey = createTransformer ( ) . getCacheKey ! (
58
59
sourceText ,
@@ -65,7 +66,7 @@ describe('getCacheKey', () => {
65
66
66
67
test ( 'if `babelOptions.options` value is changing' , ( ) => {
67
68
jest . doMock ( '../loadBabelConfig' , ( ) => {
68
- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
69
+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
69
70
70
71
return {
71
72
loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -75,7 +76,8 @@ describe('getCacheKey', () => {
75
76
} ;
76
77
} ) ;
77
78
78
- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
79
+ const { createTransformer} =
80
+ require ( '../index' ) as typeof import ( '../index' ) ;
79
81
80
82
const newCacheKey = createTransformer ( ) . getCacheKey ! (
81
83
sourceText ,
@@ -117,7 +119,7 @@ describe('getCacheKey', () => {
117
119
118
120
test ( 'if `babelOptions.config` value is changing' , ( ) => {
119
121
jest . doMock ( '../loadBabelConfig' , ( ) => {
120
- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
122
+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
121
123
122
124
return {
123
125
loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -127,7 +129,8 @@ describe('getCacheKey', () => {
127
129
} ;
128
130
} ) ;
129
131
130
- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
132
+ const { createTransformer} =
133
+ require ( '../index' ) as typeof import ( '../index' ) ;
131
134
132
135
const newCacheKey = createTransformer ( ) . getCacheKey ! (
133
136
sourceText ,
@@ -140,7 +143,7 @@ describe('getCacheKey', () => {
140
143
141
144
test ( 'if `babelOptions.babelrc` value is changing' , ( ) => {
142
145
jest . doMock ( '../loadBabelConfig' , ( ) => {
143
- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
146
+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
144
147
145
148
return {
146
149
loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -150,7 +153,8 @@ describe('getCacheKey', () => {
150
153
} ;
151
154
} ) ;
152
155
153
- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
156
+ const { createTransformer} =
157
+ require ( '../index' ) as typeof import ( '../index' ) ;
154
158
155
159
const newCacheKey = createTransformer ( ) . getCacheKey ! (
156
160
sourceText ,
0 commit comments