summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-12-22 11:16:22 +0000
committerw0rp <devw0rp@gmail.com>2016-12-22 11:16:22 +0000
commit771bfe3b185adb87e9480118eff8b476f6f02f05 (patch)
treec4abee75714ac0dfbed2797eb402a9e181bcec2c /test
parentbda6df61a08e9582f43dd419b3fc18a15a714c5b (diff)
downloadale-771bfe3b185adb87e9480118eff8b476f6f02f05.zip
#193 Fix a parsing error for parsing errors with eslint
Diffstat (limited to 'test')
-rw-r--r--test/test_eslint_handler.vader43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/test_eslint_handler.vader b/test/test_eslint_handler.vader
new file mode 100644
index 00000000..57efa6b0
--- /dev/null
+++ b/test/test_eslint_handler.vader
@@ -0,0 +1,43 @@
+Execute(The eslint handler should parse lines correctly):
+ runtime ale_linters/javascript/eslint.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 47,
+ \ 'vcol': 0,
+ \ 'col': 14,
+ \ 'text': 'Missing trailing comma. [Warning/comma-dangle]',
+ \ 'type': 'W',
+ \ 'nr': -1,
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 56,
+ \ 'vcol': 0,
+ \ 'col': 41,
+ \ 'text': 'Missing semicolon. [Error/semi]',
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 13,
+ \ 'vcol': 0,
+ \ 'col': 3,
+ \ 'text': 'Parsing error: Unexpected token',
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ },
+ \ ],
+ \ 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()