diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-16 22:57:15 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-16 22:57:15 +0100 |
commit | 3443994a5211cc823ac87379eacdfbdb08663bee (patch) | |
tree | 3f9da65bed39734a17786eb56816bfd6334574e6 /test/handler/test_eslint_handler.vader | |
parent | e2860f8a26dc9c04bb4ad6fb59ffb8c743717149 (diff) | |
download | ale-3443994a5211cc823ac87379eacdfbdb08663bee.zip |
#538 Set some end columns for some eslint problems
Diffstat (limited to 'test/handler/test_eslint_handler.vader')
-rw-r--r-- | test/handler/test_eslint_handler.vader | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/test/handler/test_eslint_handler.vader b/test/handler/test_eslint_handler.vader index 6d84ff7e..9d5e98fc 100644 --- a/test/handler/test_eslint_handler.vader +++ b/test/handler/test_eslint_handler.vader @@ -5,21 +5,18 @@ Execute(The eslint handler should parse lines correctly): 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', @@ -117,3 +114,58 @@ Execute(The eslint handler should print a message for invalid configuration sett \ 'detail': join(g:config_error_lines, "\n"), \ }], \ ale_linters#javascript#eslint#Handle(347, g:config_error_lines[:]) + +Execute(The eslint handler should output end_col values where appropriate): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 3, + \ 'end_col': 15, + \ 'text': 'Parsing error: Unexpected token ''some string'' [Error]', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 70, + \ 'col': 3, + \ 'end_col': 5, + \ 'text': '''foo'' is not defined. [Error/no-undef]', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 71, + \ 'col': 2, + \ 'end_col': 6, + \ 'text': 'Unexpected `await` inside a loop. [Error/no-await-in-loop]', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 72, + \ 'col': 6, + \ 'end_col': 10, + \ 'text': 'Redundant use of `await` on a return value. [Error/no-return-await]', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 73, + \ 'col': 4, + \ 'end_col': 10, + \ 'text': 'Unexpected console statement [Error/no-console]', + \ 'type': 'E', + \ }, + \ { + \ 'lnum': 74, + \ 'col': 4, + \ 'end_col': 11, + \ 'text': 'Unexpected ''debugger'' statement. [Error/no-debugger]', + \ 'type': 'E', + \ }, + \ ], + \ ale_linters#javascript#eslint#Handle(347, [ + \ 'app.js:4:3: Parsing error: Unexpected token ''some string'' [Error]', + \ 'app.js:70:3: ''foo'' is not defined. [Error/no-undef]', + \ 'app.js:71:2: Unexpected `await` inside a loop. [Error/no-await-in-loop]', + \ 'app.js:72:6: Redundant use of `await` on a return value. [Error/no-return-await]', + \ 'app.js:73:4: Unexpected console statement [Error/no-console]', + \ 'app.js:74:4: Unexpected ''debugger'' statement. [Error/no-debugger]', + \ ]) |