mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 14:56:52 +08:00
Group handler test cases in a directory
This commit is contained in:
37
test/handler/test_eslint_handler.vader
Normal file
37
test/handler/test_eslint_handler.vader
Normal file
@@ -0,0 +1,37 @@
|
||||
Execute(The eslint handler should parse lines correctly):
|
||||
runtime ale_linters/javascript/eslint.vim
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'bufnr': 347,
|
||||
\ 'lnum': 47,
|
||||
\ 'col': 14,
|
||||
\ 'text': 'Missing trailing comma. [Warning/comma-dangle]',
|
||||
\ 'type': 'W',
|
||||
\ },
|
||||
\ {
|
||||
\ 'bufnr': 347,
|
||||
\ 'lnum': 56,
|
||||
\ 'col': 41,
|
||||
\ 'text': 'Missing semicolon. [Error/semi]',
|
||||
\ 'type': 'E',
|
||||
\ },
|
||||
\ {
|
||||
\ 'bufnr': 347,
|
||||
\ 'lnum': 13,
|
||||
\ 'col': 3,
|
||||
\ 'text': 'Parsing error: Unexpected token',
|
||||
\ 'type': 'E',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#javascript#eslint#Handle(347, [
|
||||
\ 'This line should be ignored completely',
|
||||
\ '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
|
||||
\ '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
|
||||
\ 'This line should be ignored completely',
|
||||
\ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token',
|
||||
\ ])
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
Reference in New Issue
Block a user