summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-08-10 18:28:38 +0100
committerGitHub <noreply@github.com>2018-08-10 18:28:38 +0100
commit6167f756280c6d4d10a5d6dc7453393588d90178 (patch)
treedbf30d13f49cd3598b7ed3a39d51ddc6a6b9a498 /test
parenta56e801567907c683987858dc9a7a913c2d0cec4 (diff)
parent63c66dc5d2bd37cdd1c5abd78e635bfc3b08e14c (diff)
downloadale-6167f756280c6d4d10a5d6dc7453393588d90178.zip
Merge pull request #1802 from flybayer/fix-prettier-d
Don't use error output from prettier_d for fixing files
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 130941d1..44245630 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -249,3 +249,21 @@ Execute(Should set --parser based on first filetype of multiple filetypes):
\ . ' --stdin-filepath %s --stdin',
\ },
\ ale#fixers#prettier#ApplyFixForVersion(bufnr(''), ['1.6.0'])
+
+Execute(The prettier_d post-processor should permit regular JavaScript content):
+ AssertEqual
+ \ [
+ \ 'const x = ''Error: foo''',
+ \ 'const y = 3',
+ \ ],
+ \ ale#fixers#prettier#ProcessPrettierDOutput(bufnr(''), [
+ \ 'const x = ''Error: foo''',
+ \ 'const y = 3',
+ \ ])
+
+Execute(The prettier_d post-processor should handle error messages correctly):
+ AssertEqual
+ \ [],
+ \ ale#fixers#prettier#ProcessPrettierDOutput(bufnr(''), [
+ \ 'SyntaxError: Unexpected token, expected "," (36:28)',
+ \ ])