File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,13 @@ describe('linter', () => {
18
18
} )
19
19
20
20
it ( 'should set canLint to false when linting fails' , async ( ) => {
21
- jest . spyOn ( console , 'error' ) . mockImplementation ( ( ) => { } ) // eslint-disable-line
22
- try {
23
- const linter = new Linter ( {
24
- executablePath : '77b4d3f6-c87a-11ec-9b62-a3c90f66d29f' ,
25
- } )
26
- expect ( await linter . lint ( textToDoc ( '' ) , [ ] ) ) . toEqual ( [ ] )
27
- expect ( linter . canLint ) . toBe ( false )
28
- } finally {
29
- ; ( console . error as any ) . mockRestore ( )
30
- }
21
+ jest . spyOn ( console , 'error' ) . mockImplementation ( )
22
+ const executablePath = '77b4d3f6-c87a-11ec-9b62-a3c90f66d29f'
23
+ const linter = new Linter ( {
24
+ executablePath,
25
+ } )
26
+ expect ( await linter . lint ( textToDoc ( '' ) , [ ] ) ) . toEqual ( [ ] )
27
+ expect ( linter . canLint ) . toBe ( false )
31
28
} )
32
29
33
30
it ( 'should lint when shellcheck present' , async ( ) => {
You can’t perform that action at this time.
0 commit comments