summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
authorDonnie West <me@donniewest.com>2019-10-18 12:44:47 -0500
committerDonnie West <me@donniewest.com>2019-11-08 16:41:37 -0600
commitdb5fe5659f260f63cc777ea7c42575fd0e44bcde (patch)
tree25116417c7c436aa729e2b789eb428d3e1b41972 /test/completion
parentdb6b1b5ecc17558f87f55b159f90ebf36677b6b3 (diff)
downloadale-db5fe5659f260f63cc777ea7c42575fd0e44bcde.zip
Allow the user to remove warnings from completions
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/test_tsserver_completion_parsing.vader45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/completion/test_tsserver_completion_parsing.vader b/test/completion/test_tsserver_completion_parsing.vader
index dbb8de32..5dfef531 100644
--- a/test/completion/test_tsserver_completion_parsing.vader
+++ b/test/completion/test_tsserver_completion_parsing.vader
@@ -29,6 +29,51 @@ Execute(TypeScript completions responses should be parsed correctly):
\ ],
\})
+Execute(TypeScript completions responses should include warnings):
+ AssertEqual
+ \ [
+ \ {
+ \ 'word': 'foo',
+ \ 'source': '/path/to/foo.ts',
+ \ },
+ \ {
+ \ 'word': 'bar',
+ \ 'source': '',
+ \ },
+ \ {
+ \ 'word': 'baz',
+ \ 'source': '',
+ \ }
+ \ ],
+ \ ale#completion#ParseTSServerCompletions({
+ \ 'body': [
+ \ {'name': 'foo', 'source': '/path/to/foo.ts'},
+ \ {'name': 'bar', 'kind': 'warning'},
+ \ {'name': 'baz'},
+ \ ],
+ \})
+
+Execute(TypeScript completions responses should not include warnings if excluded):
+ let g:ale_completion_tsserver_remove_warnings = 1
+ AssertEqual
+ \ [
+ \ {
+ \ 'word': 'foo',
+ \ 'source': '/path/to/foo.ts',
+ \ },
+ \ {
+ \ 'word': 'baz',
+ \ 'source': '',
+ \ }
+ \ ],
+ \ ale#completion#ParseTSServerCompletions({
+ \ 'body': [
+ \ {'name': 'foo', 'source': '/path/to/foo.ts'},
+ \ {'name': 'bar', 'kind': 'warning'},
+ \ {'name': 'baz'},
+ \ ],
+ \})
+
Execute(TypeScript completion details responses should be parsed correctly):
AssertEqual
\ [