summaryrefslogtreecommitdiff
path: root/test/completion/test_tsserver_completion_parsing.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion/test_tsserver_completion_parsing.vader')
-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
\ [