summaryrefslogtreecommitdiff
path: root/test/fixers/test_prettier_fixer_callback.vader
diff options
context:
space:
mode:
authorAbin Simon <abinsimon10@gmail.com>2018-11-12 12:28:34 +0530
committerAbin Simon <abinsimon10@gmail.com>2018-11-12 12:28:34 +0530
commit1f4dbb82ec12f0f56cc2e33558023e42e097fa5f (patch)
treee48e82389a14e4cf5bab24455cdf12d83c6d04a7 /test/fixers/test_prettier_fixer_callback.vader
parentd30da203b91345b472e5d83f048bd42a6ca13804 (diff)
downloadale-1f4dbb82ec12f0f56cc2e33558023e42e097fa5f.zip
add tests for prettier-html
Diffstat (limited to 'test/fixers/test_prettier_fixer_callback.vader')
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 3697e87c..7f25471b 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -236,6 +236,20 @@ Execute(Should set --parser based on filetype, YAML):
\ },
\ ale#fixers#prettier#ApplyFixForVersion(bufnr(''), ['1.6.0'])
+Execute(Should set --parser based on filetype, HTML):
+ call ale#test#SetFilename('../prettier-test-files/testfile')
+
+ set filetype=html
+
+ AssertEqual
+ \ {
+ \ 'command': ale#path#CdString(expand('%:p:h'))
+ \ . ale#Escape(g:ale_javascript_prettier_executable)
+ \ . ' --parser html'
+ \ . ' --stdin-filepath %s --stdin',
+ \ },
+ \ ale#fixers#prettier#ApplyFixForVersion(bufnr(''), ['1.6.0'])
+
Execute(Should set --parser based on first filetype of multiple filetypes):
call ale#test#SetFilename('../prettier-test-files/testfile')