File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,28 @@ describe("analyze", () => {
8383 ) . rejects . toThrow ( ) ;
8484 } ) ;
8585
86+ it . failing ( "should print Checked when there are errors" , async ( ) => {
87+ await expect ( ctx . runEask ( "analyze Eask-error" ) ) . rejects . toMatchObject ( {
88+ stderr : "(Checked 1 file)" ,
89+ } ) ;
90+ } ) ;
91+
8692 it . failing ( "should check all files when --allow-error is set" , async ( ) => {
93+ // this is not a great test because when there is any error it doesn't print this note
8794 await expect (
8895 ctx . runEask ( "analyze --allow-error Eask-normal Eask-error" ) ,
8996 ) . rejects . toMatchObject ( { stderr : "(Checked 2 files)" } ) ;
9097 } ) ;
98+
99+ // although the output does match, it still doesn't exit with an error
100+ it . failing (
101+ "should have later warnings when --allow-error is set" ,
102+ async ( ) => {
103+ await expect (
104+ ctx . runEask ( "analyze --allow-error Eask-error Eask-warn" ) ,
105+ // this warning is specific to Eask-warn
106+ ) . rejects . toMatchObject ( { stderr : "missing `none.el'" } ) ;
107+ } ,
108+ ) ;
91109 } ) ;
92110} ) ;
You can’t perform that action at this time.
0 commit comments