summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-22 19:21:30 +0100
committerw0rp <devw0rp@gmail.com>2017-07-22 19:21:30 +0100
commit78e37dabb7ae96691dc10d994125e143c6b50c57 (patch)
tree71e003887f1396cd2311e47f1892aa91995ede9c /test
parentee6dabcc4e2f64c7a035a2e7da3bc13285013d88 (diff)
downloadale-78e37dabb7ae96691dc10d994125e143c6b50c57.zip
Fix #794 - Filter out any preceding lines of Flow output which aren't JSON
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_flow_handler.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/handler/test_flow_handler.vader b/test/handler/test_flow_handler.vader
index 46b52229..288610b0 100644
--- a/test/handler/test_flow_handler.vader
+++ b/test/handler/test_flow_handler.vader
@@ -7,6 +7,22 @@ After:
unlet! g:actual
call ale#linter#Reset()
+Execute(The flow handler should throw away non-JSON lines):
+ AssertEqual
+ \ [],
+ \ ale_linters#javascript#flow#Handle(bufnr(''), [
+ \ 'Already up-to-date.',
+ \ '{"flowVersion":"0.50.0","errors":[],"passed":true}',
+ \ ])
+ AssertEqual
+ \ [],
+ \ ale_linters#javascript#flow#Handle(bufnr(''), [
+ \ 'foo',
+ \ 'bar',
+ \ 'baz',
+ \ '{"flowVersion":"0.50.0","errors":[],"passed":true}',
+ \ ])
+
Execute(The flow handler should process errors correctly.):
silent! noautocmd file /home/w0rp/Downloads/graphql-js/src/language/parser.js