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", () => {
6464 expect ( pm . isMatch ( "fail" , [ "pattern" ] ) ) . toBe ( false ) ;
6565 } ) ;
6666
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 / ) ;
6969 } ) ;
7070} ) ;
Original file line number Diff line number Diff line change @@ -68,22 +68,22 @@ describe("normalizeConfig", () => {
6868 expect ( result . rules . patterns [ "**.id.**" ] ) . toHaveLength ( 1 ) ;
6969 } ) ;
7070
71- it ( "throws on invalid bracket key" , ( ) => {
71+ it ( "throws on invalid bracket key" , async ( ) => {
7272 const config : Config < any > = {
7373 byStrategy : {
7474 merge : [ "[a.b]" ] ,
7575 } ,
7676 } ;
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 / ) ;
7878 } ) ;
7979
80- it ( "throws on empty rule key" , ( ) => {
80+ it ( "throws on empty rule key" , async ( ) => {
8181 const config : Config < any > = {
8282 byStrategy : {
8383 merge : [ "!" ] ,
8484 } ,
8585 } ;
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 / ) ;
8787 } ) ;
8888
8989 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
6161 if ( ! / n o d e _ m o d u l e s | \. g i t / . test ( entry . name ) ) {
6262 await walk ( fullPath ) ;
6363 }
64- } else if ( fileFilter ( path . relative ( fullPath , root ) ) ) {
64+ } else if ( fileFilter ( path . relative ( root , fullPath ) ) ) {
6565 try {
6666 const content = await fs . readFile ( fullPath , "utf8" ) ;
6767
You can’t perform that action at this time.
0 commit comments