summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCyrille David <dcyriller@users.noreply.github.com>2020-08-31 10:26:33 +0200
committerGitHub <noreply@github.com>2020-08-31 09:26:33 +0100
commitd4a14746cdcda99ec70915c5540962c85e33f661 (patch)
treec577008a678dc29cf3df950a569889ef730ddf5f /test
parentac2100d410378906d7d277561f50ae3305b6429e (diff)
downloadale-d4a14746cdcda99ec70915c5540962c85e33f661.zip
feat(template-lint): Read from stdin (#2622)
* ember-template-lint: Lint from stdin * This feature has recently been implemented in ember-template-lint. * Refactor ember-template-lint executable * Fallback on a temporary file for old template-lint Co-authored-by: w0rp <w0rp@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r--test/ember-template-lint-test-files/app/template.hbs0
-rw-r--r--test/ember-template-lint-test-files/package.json0
-rw-r--r--test/test_embertemplatelint_executable_detection.vader22
3 files changed, 22 insertions, 0 deletions
diff --git a/test/ember-template-lint-test-files/app/template.hbs b/test/ember-template-lint-test-files/app/template.hbs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ember-template-lint-test-files/app/template.hbs
diff --git a/test/ember-template-lint-test-files/package.json b/test/ember-template-lint-test-files/package.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/ember-template-lint-test-files/package.json
diff --git a/test/test_embertemplatelint_executable_detection.vader b/test/test_embertemplatelint_executable_detection.vader
new file mode 100644
index 00000000..bd0f5dd9
--- /dev/null
+++ b/test/test_embertemplatelint_executable_detection.vader
@@ -0,0 +1,22 @@
+Before:
+ call ale#test#SetDirectory('/testplugin/test')
+
+ runtime ale_linters/handlebars/embertemplatelint.vim
+
+After:
+ call ale#test#RestoreDirectory()
+ call ale#linter#Reset()
+
+Execute(ember-template-lint executables runs the right command):
+ call ale#test#SetFilename('ember-template-lint-test-files/app/template.hbs')
+
+ AssertEqual
+ \ ale_linters#handlebars#embertemplatelint#GetCommand(bufnr(''), [2, 0, 0]),
+ \ '%e --json --filename %s'
+
+Execute(old ember-template-lint executables runs the right command):
+ call ale#test#SetFilename('ember-template-lint-test-files/app/template.hbs')
+
+ AssertEqual
+ \ ale_linters#handlebars#embertemplatelint#GetCommand(bufnr(''), [1, 5, 0]),
+ \ '%e --json %t'