@@ -4,7 +4,7 @@ import values from 'lodash/values';
4
4
import rules from '.' ;
5
5
6
6
test ( 'exports all rules' , async ( ) => {
7
- const expected = ( await glob ( '*.js ' ) ) . sort ( ) ;
7
+ const expected = ( await glob ( '*.ts ' ) ) . sort ( ) ;
8
8
const actual = Object . keys ( rules ) . sort ( ) ;
9
9
expect ( actual ) . toEqual ( expected ) ;
10
10
} ) ;
@@ -14,18 +14,18 @@ test('rules export functions', () => {
14
14
expect ( actual . every ( rule => typeof rule === 'function' ) ) . toBe ( true ) ;
15
15
} ) ;
16
16
17
- async function glob ( pattern ) {
17
+ async function glob ( pattern : string | string [ ] ) {
18
18
const files = await globby ( pattern , {
19
- ignore : [ '**/index.js ' , '**/*.test.js ' ] ,
19
+ ignore : [ '**/index.ts ' , '**/*.test.ts' , '**/types.ts '] ,
20
20
cwd : __dirname
21
21
} ) ;
22
22
return files . map ( relative ) . map ( toExport ) ;
23
23
}
24
24
25
- function relative ( filePath ) {
25
+ function relative ( filePath : string ) {
26
26
return path . relative ( __dirname , filePath ) ;
27
27
}
28
28
29
- function toExport ( fileName ) {
29
+ function toExport ( fileName : string ) {
30
30
return path . basename ( fileName , path . extname ( fileName ) ) ;
31
31
}
0 commit comments