mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Handle failing to connect to eslint_d
This commit is contained in:
@@ -170,3 +170,10 @@ Execute(The eslint_d post-processor should handle error messages correctly):
|
||||
\ ale#fixers#eslint#ProcessEslintDOutput(bufnr(''), [
|
||||
\ 'Error: No ESLint configuration found.',
|
||||
\ ])
|
||||
|
||||
Execute(The eslint_d post-processor should handle failing to connect properly):
|
||||
AssertEqual
|
||||
\ [],
|
||||
\ ale#fixers#eslint#ProcessEslintDOutput(bufnr(''), [
|
||||
\ 'Could not connect',
|
||||
\ ])
|
||||
|
||||
@@ -365,3 +365,15 @@ Execute(eslint should handle react errors correctly):
|
||||
\ ale#handlers#eslint#Handle(bufnr(''), [
|
||||
\ '/path/editor-help.jsx:59:9: Property should be placed on the same line as the component declaration [Error/react/jsx-first-prop-new-line]',
|
||||
\ ])
|
||||
|
||||
Execute(Failing to connect to eslint_d should be handled correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'text': 'Could not connect to eslint_d. Try updating eslint_d or killing it.',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#eslint#Handle(bufnr(''), [
|
||||
\ 'Could not connect',
|
||||
\ ])
|
||||
|
||||
Reference in New Issue
Block a user