fix: Don't use error output from prettier_d for fixing files

This commit is contained in:
Brandon Bayer
2018-08-09 12:56:53 -04:00
parent 634bf73f52
commit 63c66dc5d2
2 changed files with 40 additions and 0 deletions

View File

@@ -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)',
\ ])