summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
authorSorin Iclanzan <sorin@iclanzan.com>2020-08-28 03:14:50 -0400
committerGitHub <noreply@github.com>2020-08-28 08:14:50 +0100
commit80bd2e18d65e335492cc4f6ba3fe15cc98740ef3 (patch)
tree559dc8796cfecf684e189374362fd06fc911d947 /test/fixers
parentecd7abecc08ead5d8f055b26498e1c4a2a2c3065 (diff)
downloadale-80bd2e18d65e335492cc4f6ba3fe15cc98740ef3.zip
Set prettier working directory to where .prettierignore is (#3101)
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides. * Update Prettier tests * Look for prettierignore to determine project root
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 1087a160..fdd97df3 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -297,6 +297,17 @@ Execute(Should set --parser for experimental language, Handlebars):
\ . ' --stdin-filepath %s --stdin',
\ }
+Execute(Changes to directory where .prettierignore is found):
+ call ale#test#SetFilename('../prettier-test-files/with_prettierignore/src/testfile.js')
+
+ GivenCommandOutput ['1.6.0']
+ AssertFixer
+ \ {
+ \ 'command': ale#path#CdString(expand('%:p:h:h'))
+ \ . ale#Escape(g:ale_javascript_prettier_executable)
+ \ . ' --stdin-filepath %s --stdin',
+ \ }
+
Execute(The prettier_d post-processor should permit regular JavaScript content):
AssertEqual
\ [