File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe("loadMatcher", () => {
64
64
expect ( pm . isMatch ( "fail" , [ "pattern" ] ) ) . toBe ( false ) ;
65
65
} ) ;
66
66
67
- it ( "throws on unknown matcher" , ( ) => {
68
- expect ( ( ) => loadMatcher ( "invalid" as any ) ) . rejects . toThrow ( / U n k n o w n m a t c h e r / ) ;
67
+ it ( "throws on unknown matcher" , async ( ) => {
68
+ await expect ( ( ) => loadMatcher ( "invalid" as any ) ) . rejects . toThrow ( / U n k n o w n m a t c h e r / ) ;
69
69
} ) ;
70
70
} ) ;
Original file line number Diff line number Diff line change @@ -68,22 +68,22 @@ describe("normalizeConfig", () => {
68
68
expect ( result . rules . patterns [ "**.id.**" ] ) . toHaveLength ( 1 ) ;
69
69
} ) ;
70
70
71
- it ( "throws on invalid bracket key" , ( ) => {
71
+ it ( "throws on invalid bracket key" , async ( ) => {
72
72
const config : Config < any > = {
73
73
byStrategy : {
74
74
merge : [ "[a.b]" ] ,
75
75
} ,
76
76
} ;
77
- expect ( ( ) => normalizeConfig ( config ) ) . rejects . toThrow ( / I n v a l i d b r a c k e t f o r m / ) ;
77
+ await expect ( ( ) => normalizeConfig ( config ) ) . rejects . toThrow ( / I n v a l i d b r a c k e t f o r m / ) ;
78
78
} ) ;
79
79
80
- it ( "throws on empty rule key" , ( ) => {
80
+ it ( "throws on empty rule key" , async ( ) => {
81
81
const config : Config < any > = {
82
82
byStrategy : {
83
83
merge : [ "!" ] ,
84
84
} ,
85
85
} ;
86
- expect ( ( ) => normalizeConfig ( config ) ) . rejects . toThrow ( / I n v a l i d r u l e k e y / ) ;
86
+ await expect ( ( ) => normalizeConfig ( config ) ) . rejects . toThrow ( / I n v a l i d r u l e k e y / ) ;
87
87
} ) ;
88
88
89
89
it ( "expands rules tree into exact entries" , async ( ) => {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export const listMatchingFiles = async (options: CollectFilesOptions): Promise<F
61
61
if ( ! / n o d e _ m o d u l e s | \. g i t / . test ( entry . name ) ) {
62
62
await walk ( fullPath ) ;
63
63
}
64
- } else if ( fileFilter ( path . relative ( fullPath , root ) ) ) {
64
+ } else if ( fileFilter ( path . relative ( root , fullPath ) ) ) {
65
65
try {
66
66
const content = await fs . readFile ( fullPath , "utf8" ) ;
67
67
You can’t perform that action at this time.
0 commit comments