install.fairie/dotfiles/.vim/plugged/ale/test/fixers/test_standard_fixer_callback.vader
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

31 lines
957 B
Text

Before:
call ale#test#SetDirectory('/testplugin/test/fixers')
unlet! b:ale_javascript_standard_executable
unlet! b:ale_javascript_standard_options
After:
call ale#test#RestoreDirectory()
Execute(The executable path should be correct):
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.js')
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/standard/bin/cmd.js'))
\ . ' --fix --stdin < %s > %t',
\ },
\ ale#fixers#standard#Fix(bufnr(''))
Execute(Custom options should be supported):
let b:ale_javascript_standard_use_global = 1
let b:ale_javascript_standard_options = '--foo-bar'
AssertEqual
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('standard') . ' --foo-bar --fix --stdin < %s > %t',
\ },
\ ale#fixers#standard#Fix(bufnr(''))