summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Zalewski <aazalewski@hotmail.com>2017-05-28 21:19:47 +0200
committerAdrian Zalewski <aazalewski@hotmail.com>2017-05-28 21:19:47 +0200
commit7ed343965cb839263466fa3b3a028a7581d61934 (patch)
tree7aa218bfc43347ab66bb81c16a2859899ddd2ba9 /test
parent945ed7d4e7d801108103e97ac41063a85c3b4c5d (diff)
downloadale-7ed343965cb839263466fa3b3a028a7581d61934.zip
Ember-template-lint handler: properly handle template parsing errors.
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_embertemplatelint_handler.vader27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/handler/test_embertemplatelint_handler.vader b/test/handler/test_embertemplatelint_handler.vader
index 5261bbe5..cc3e8bb9 100644
--- a/test/handler/test_embertemplatelint_handler.vader
+++ b/test/handler/test_embertemplatelint_handler.vader
@@ -46,6 +46,33 @@ Execute(The ember-template-lint handler should parse lines correctly):
\ ],
\ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines)
+Execute(The ember-template-lint handler should handle template parsing error correctly):
+ let input_lines = split('{
+ \ "/ember-project/app/templates/application.hbs": [
+ \ {
+ \ "fatal": true,
+ \ "moduleId": "app/templates/application",
+ \ "message": "Parse error on line 5 ...",
+ \ "line": 1,
+ \ "column": 1,
+ \ "source": "Error: Parse error on line 5 ...",
+ \ "severity": 2
+ \ }
+ \ ]
+ \ }', '\n')
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 1,
+ \ 'col': 1,
+ \ 'text': 'Parse error on line 5 ...',
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale_linters#handlebars#embertemplatelint#Handle(347, input_lines)
+
Execute(The ember-template-lint handler should handle no lint errors/warnings):
AssertEqual
\ [