Skip to content
This repository was archived by the owner on Feb 7, 2022. It is now read-only.

Commit 4c39c80

Browse files
committed
Fix possibleExtensions in findConfigFile to make it match jsVariants
1 parent 2e402bb commit 4c39c80

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/__tests__/findConfigFile.spec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
jest.mock('fs');
22

3-
import findConfigFile from '../findConfigFile';
43
import fs from 'fs';
54

5+
import findConfigFile from '../findConfigFile';
6+
67
const possibleExtensions = [
78
'',
89
'.js',
910
'.babel.js',
11+
'.babel.ts',
1012
'.buble.js',
1113
'.cirru',
1214
'.cjsx',
1315
'.co',
1416
'.coffee',
1517
'.coffee.md',
1618
'.eg',
19+
'.esm.js',
1720
'.iced',
1821
'.iced.md',
1922
'.jsx',
2023
'.litcoffee',
2124
'.liticed',
2225
'.ls',
2326
'.ts',
27+
'.tsx',
2428
'.wisp'
2529
];
2630

@@ -53,7 +57,7 @@ describe('findConfigFile', () => {
5357
findConfigFile('/path/to/file')
5458
}).toThrow();
5559

56-
expect(fs.statSync).toHaveBeenCalledTimes(18);
60+
expect(fs.statSync).toHaveBeenCalledTimes(possibleExtensions.length);
5761
});
5862

5963
it('should return file from accessSync', () => {

0 commit comments

Comments
 (0)