summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPavel Kuropatkin <mrpeabody@users.noreply.github.com>2017-06-18 10:46:34 -0700
committerw0rp <w0rp@users.noreply.github.com>2017-06-18 18:46:34 +0100
commit11e17669d3836371a2b6c5878a2fce1b74db5fcf (patch)
tree95aa7d99a6ac586b77aae06056d5caff76ae7b5b /test
parentaf1ab0b5a9a2fe6f740bcc612233f2eeac77a347 (diff)
downloadale-11e17669d3836371a2b6c5878a2fce1b74db5fcf.zip
TSLint: distinguish warnings from errors (#663)
* TSLint: distinguish warnings from errors * Test for TSlint warning/error distinguishing code added.
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_tslint_handler.vader41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/handler/test_tslint_handler.vader b/test/handler/test_tslint_handler.vader
new file mode 100644
index 00000000..92ed7059
--- /dev/null
+++ b/test/handler/test_tslint_handler.vader
@@ -0,0 +1,41 @@
+Before:
+ runtime ale_linters/typescript/tslint.vim
+
+Execute(The tslint handler should parse lines correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 235,
+ \ 'col': 21,
+ \ 'text': 'unused expression, expected an assignment or function call',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 35,
+ \ 'col': 6,
+ \ 'text': 'Missing semicolon',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 147,
+ \ 'col': 10,
+ \ 'text': 'Unnecessary semicolon',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 101,
+ \ 'col': 25,
+ \ 'text': 'Unnecessary trailing comma',
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale_linters#typescript#tslint#Handle(347, [
+ \ 'This line should be ignored completely',
+ \ 'WARNING: hello.ts[235, 21]: unused expression, expected an assignment or function call',
+ \ 'ERROR: hello.ts[35, 6]: Missing semicolon',
+ \ 'WARNING: hello.ts[147, 10]: Unnecessary semicolon',
+ \ 'ERROR: hello.ts[101, 25]: Unnecessary trailing comma'
+ \ ])
+
+After:
+ call ale#linter#Reset()