summaryrefslogtreecommitdiff
path: root/test/handler/test_tslint_handler.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-25 16:40:44 +0100
committerw0rp <devw0rp@gmail.com>2017-06-25 16:40:44 +0100
commit229a1c092a6f7d5116590bed2cf0e97ad63bbc7c (patch)
tree1c017369e01f9cc495a8fa041df6dcb41b3abfc8 /test/handler/test_tslint_handler.vader
parent492260c967a2d5e955698584fbf1f075f44cda7c (diff)
downloadale-229a1c092a6f7d5116590bed2cf0e97ad63bbc7c.zip
#684 Handle tslint errors without the severity included, and use character instead of position for the columns
Diffstat (limited to 'test/handler/test_tslint_handler.vader')
-rw-r--r--test/handler/test_tslint_handler.vader35
1 files changed, 29 insertions, 6 deletions
diff --git a/test/handler/test_tslint_handler.vader b/test/handler/test_tslint_handler.vader
index cf6ea4e3..6da218b2 100644
--- a/test/handler/test_tslint_handler.vader
+++ b/test/handler/test_tslint_handler.vader
@@ -25,19 +25,27 @@ Execute(The tslint handler should parse lines correctly):
\ },
\ {
\ 'lnum': 2,
- \ 'col': 15,
+ \ 'col': 8,
\ 'end_lnum': 3,
- \ 'end_col': 23,
+ \ 'end_col': 12,
\ 'text': 'Something else',
\ 'type': 'W',
\ },
+ \ {
+ \ 'lnum': 31,
+ \ 'col': 9,
+ \ 'end_lnum': 31,
+ \ 'end_col': 20,
+ \ 'text': 'Calls to console.log are not allowed.',
+ \ 'type': 'E',
+ \ },
\ ],
\ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([
\ {
\ 'endPosition': {
\ 'character': 14,
\ 'line': 0,
- \ 'position': 14
+ \ 'position': 1000
\ },
\ 'failure': 'Missing semicolon',
\ 'fix': {
@@ -51,14 +59,14 @@ Execute(The tslint handler should parse lines correctly):
\ 'startPosition': {
\ 'character': 14,
\ 'line': 0,
- \ 'position': 14
+ \ 'position': 1000
\ }
\ },
\ {
\ 'endPosition': {
\ 'character': 11,
\ 'line': 2,
- \ 'position': 22
+ \ 'position': 1000
\ },
\ 'failure': 'Something else',
\ 'fix': {
@@ -72,7 +80,7 @@ Execute(The tslint handler should parse lines correctly):
\ 'startPosition': {
\ 'character': 7,
\ 'line': 1,
- \ 'position': 14
+ \ 'position': 1000
\ }
\ },
\ {
@@ -96,4 +104,19 @@ Execute(The tslint handler should parse lines correctly):
\ 'position': 14
\ }
\ },
+ \ {
+ \ "endPosition": {
+ \ "character": 19,
+ \ "line": 30,
+ \ "position": 14590
+ \ },
+ \ "failure": "Calls to console.log are not allowed.",
+ \ 'name': 'app/test.ts',
+ \ "ruleName": "no-console",
+ \ "startPosition": {
+ \ "character": 8,
+ \ "line": 30,
+ \ "position": 14579
+ \ }
+ \ },
\])])