@@ -52,7 +52,8 @@ describe('getCacheKey', () => {
5252 readFileSync : ( ) => 'new this file' ,
5353 } ) ) ;
5454
55- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
55+ const { createTransformer} =
56+ require ( '../index' ) as typeof import ( '../index' ) ;
5657
5758 const newCacheKey = createTransformer ( ) . getCacheKey ! (
5859 sourceText ,
@@ -65,7 +66,7 @@ describe('getCacheKey', () => {
6566
6667 test ( 'if `babelOptions.options` value is changing' , ( ) => {
6768 jest . doMock ( '../loadBabelConfig' , ( ) => {
68- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
69+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
6970
7071 return {
7172 loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -75,7 +76,8 @@ describe('getCacheKey', () => {
7576 } ;
7677 } ) ;
7778
78- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
79+ const { createTransformer} =
80+ require ( '../index' ) as typeof import ( '../index' ) ;
7981
8082 const newCacheKey = createTransformer ( ) . getCacheKey ! (
8183 sourceText ,
@@ -117,7 +119,7 @@ describe('getCacheKey', () => {
117119
118120 test ( 'if `babelOptions.config` value is changing' , ( ) => {
119121 jest . doMock ( '../loadBabelConfig' , ( ) => {
120- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
122+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
121123
122124 return {
123125 loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -127,7 +129,8 @@ describe('getCacheKey', () => {
127129 } ;
128130 } ) ;
129131
130- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
132+ const { createTransformer} =
133+ require ( '../index' ) as typeof import ( '../index' ) ;
131134
132135 const newCacheKey = createTransformer ( ) . getCacheKey ! (
133136 sourceText ,
@@ -140,7 +143,7 @@ describe('getCacheKey', () => {
140143
141144 test ( 'if `babelOptions.babelrc` value is changing' , ( ) => {
142145 jest . doMock ( '../loadBabelConfig' , ( ) => {
143- const babel : typeof import ( '@babel/core' ) = require ( '@babel/core' ) ;
146+ const babel = require ( '@babel/core' ) as typeof import ( '@babel/core' ) ;
144147
145148 return {
146149 loadPartialConfig : ( options : BabelTransformOptions ) => ( {
@@ -150,7 +153,8 @@ describe('getCacheKey', () => {
150153 } ;
151154 } ) ;
152155
153- const { createTransformer} : typeof import ( '../index' ) = require ( '../index' ) ;
156+ const { createTransformer} =
157+ require ( '../index' ) as typeof import ( '../index' ) ;
154158
155159 const newCacheKey = createTransformer ( ) . getCacheKey ! (
156160 sourceText ,
0 commit comments