@@ -15,15 +15,15 @@ const mockBasePath = path.join(__dirname, 'path', 'to');
1515
1616const mockConfig = {
1717 transforms : {
18- '10.0.0' : 'path/to/transform.js ' ,
18+ '10.0.0' : 'path/to/transform.ts ' ,
1919 } ,
2020} ;
2121
2222describe ( 'fetcher' , ( ) => {
2323 let mockMatchedPaths : string [ ] = [ ] ;
2424
2525 beforeEach ( ( ) => {
26- mockMatchedPaths = [ path . join ( mockBasePath , 'hypermod.config.js ' ) ] ;
26+ mockMatchedPaths = [ path . join ( mockBasePath , 'hypermod.config.ts ' ) ] ;
2727
2828 ( globby as unknown as jest . Mock ) . mockImplementation ( ( ) =>
2929 Promise . resolve ( mockMatchedPaths ) ,
@@ -38,10 +38,10 @@ describe('fetcher', () => {
3838
3939 describe ( 'fetchConfig' , ( ) => {
4040 it ( 'fetches config with default export' , async ( ) => {
41- const mockFilePath = `${ __dirname } /path/to/hypermod.config.js ` ;
41+ const mockFilePath = `${ __dirname } /path/to/hypermod.config.ts ` ;
4242
4343 jest . mock (
44- `${ __dirname } /path/to/hypermod.config.js ` ,
44+ `${ __dirname } /path/to/hypermod.config.ts ` ,
4545 ( ) => ( { __esModule : true , default : mockConfig } ) ,
4646 { virtual : true } ,
4747 ) ;
@@ -54,7 +54,7 @@ describe('fetcher', () => {
5454
5555 it ( 'fetches config with named export' , async ( ) => {
5656 jest . mock (
57- path . join ( mockBasePath , 'hypermod.config.js ' ) ,
57+ path . join ( mockBasePath , 'hypermod.config.ts ' ) ,
5858 ( ) => mockConfig ,
5959 {
6060 virtual : true ,
@@ -65,7 +65,7 @@ describe('fetcher', () => {
6565
6666 expect ( configMeta ! . config ) . toEqual ( mockConfig ) ;
6767 expect ( configMeta ! . filePath ) . toEqual (
68- path . join ( mockBasePath , 'hypermod.config.js ' ) ,
68+ path . join ( mockBasePath , 'hypermod.config.ts ' ) ,
6969 ) ;
7070 } ) ;
7171
@@ -106,7 +106,7 @@ describe('fetcher', () => {
106106
107107 describe ( 'fetchPackage' , ( ) => {
108108 it ( 'correctly fetches package and returns a config' , async ( ) => {
109- const mockFilePath = 'path/to/config.hypermod.js ' ;
109+ const mockFilePath = 'path/to/config.hypermod.ts ' ;
110110 const mockPackageManager = {
111111 install : jest . fn ( ) ,
112112 getInfo : jest . fn ( ) . mockReturnValue ( { location : mockFilePath } ) ,
@@ -154,7 +154,7 @@ describe('fetcher', () => {
154154
155155 expect ( configMeta ! . config ) . toEqual ( mockConfig ) ;
156156 expect ( configMeta ! . filePath ) . toEqual (
157- mockBasePath + '/hypermod.config.js ' ,
157+ mockBasePath + '/hypermod.config.ts ' ,
158158 ) ;
159159 } ) ;
160160
@@ -177,7 +177,7 @@ describe('fetcher', () => {
177177 install : jest . fn ( ) ,
178178 require : jest . fn ( ) . mockReturnValueOnce ( mockConfig ) ,
179179 getInfo : jest . fn ( ) . mockReturnValue ( {
180- location : mockBasePath + '/index.js ' ,
180+ location : mockBasePath + '/index.ts ' ,
181181 } ) ,
182182 } ;
183183
@@ -187,15 +187,15 @@ describe('fetcher', () => {
187187 ) ;
188188
189189 expect ( configMeta ! . config ) . toEqual ( mockConfig ) ;
190- expect ( configMeta ! . filePath ) . toEqual ( mockBasePath + '/index.js ' ) ;
190+ expect ( configMeta ! . filePath ) . toEqual ( mockBasePath + '/index.ts ' ) ;
191191 } ) ;
192192
193193 it ( 'throws if entrypoint-based config does not contain a valid config (and there are no config files available elsewhere)' , async ( ) => {
194194 const mockPackageManager = {
195195 install : jest . fn ( ) ,
196196 require : jest . fn ( ) . mockReturnValueOnce ( { } ) ,
197197 getInfo : jest . fn ( ) . mockReturnValue ( {
198- location : mockBasePath + '/index.js ' ,
198+ location : mockBasePath + '/index.ts ' ,
199199 } ) ,
200200 } ;
201201
0 commit comments