@@ -19,7 +19,7 @@ describe('fetcher', () => {
19
19
let mockMatchedPaths : string [ ] = [ ] ;
20
20
21
21
beforeEach ( ( ) => {
22
- mockMatchedPaths = [ path . join ( mockBasePath , 'hypermod.config.js ' ) ] ;
22
+ mockMatchedPaths = [ path . join ( mockBasePath , 'hypermod.config.ts ' ) ] ;
23
23
24
24
( globby as unknown as jest . Mock ) . mockImplementation ( ( ) =>
25
25
Promise . resolve ( mockMatchedPaths ) ,
@@ -34,10 +34,10 @@ describe('fetcher', () => {
34
34
35
35
describe ( 'fetchConfig' , ( ) => {
36
36
it ( 'fetches config with default export' , async ( ) => {
37
- const mockFilePath = `${ __dirname } /path/to/hypermod.config.js ` ;
37
+ const mockFilePath = `${ __dirname } /path/to/hypermod.config.ts ` ;
38
38
39
39
jest . mock (
40
- `${ __dirname } /path/to/hypermod.config.js ` ,
40
+ `${ __dirname } /path/to/hypermod.config.ts ` ,
41
41
( ) => ( { __esModule : true , default : mockConfig } ) ,
42
42
{ virtual : true } ,
43
43
) ;
@@ -50,7 +50,7 @@ describe('fetcher', () => {
50
50
51
51
it ( 'fetches config with named export' , async ( ) => {
52
52
jest . mock (
53
- path . join ( mockBasePath , 'hypermod.config.js ' ) ,
53
+ path . join ( mockBasePath , 'hypermod.config.ts ' ) ,
54
54
( ) => mockConfig ,
55
55
{
56
56
virtual : true ,
@@ -61,7 +61,7 @@ describe('fetcher', () => {
61
61
62
62
expect ( configMeta ! . config ) . toEqual ( mockConfig ) ;
63
63
expect ( configMeta ! . filePath ) . toEqual (
64
- path . join ( mockBasePath , 'hypermod.config.js ' ) ,
64
+ path . join ( mockBasePath , 'hypermod.config.ts ' ) ,
65
65
) ;
66
66
} ) ;
67
67
@@ -102,7 +102,7 @@ describe('fetcher', () => {
102
102
103
103
describe ( 'fetchPackage' , ( ) => {
104
104
it ( 'correctly fetches package and returns a config' , async ( ) => {
105
- const mockFilePath = 'path/to/config.hypermod.js ' ;
105
+ const mockFilePath = 'path/to/config.hypermod.ts ' ;
106
106
const mockPackageManager = {
107
107
install : jest . fn ( ) ,
108
108
getInfo : jest . fn ( ) . mockReturnValue ( { location : mockFilePath } ) ,
@@ -155,7 +155,7 @@ describe('fetcher', () => {
155
155
156
156
expect ( configMeta ! . config ) . toEqual ( mockConfig ) ;
157
157
expect ( configMeta ! . filePath ) . toEqual (
158
- mockBasePath + '/hypermod.config.js ' ,
158
+ mockBasePath + '/hypermod.config.ts ' ,
159
159
) ;
160
160
} ) ;
161
161
0 commit comments