diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-05-30 09:45:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-30 09:45:20 +0100 |
commit | 50fc4b5521869c4de531121383bfad3d879dffc6 (patch) | |
tree | 7aa218bfc43347ab66bb81c16a2859899ddd2ba9 /test | |
parent | 945ed7d4e7d801108103e97ac41063a85c3b4c5d (diff) | |
parent | 7ed343965cb839263466fa3b3a028a7581d61934 (diff) | |
download | ale-50fc4b5521869c4de531121383bfad3d879dffc6.zip |
Merge pull request #589 from bardzusny/ember-template-lint-handler-parsing-error
Ember-template-lint handler: properly handle template parsing errors.
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_embertemplatelint_handler.vader | 27 |
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 \ [ |