This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/fixers/test_xo_fixer_callback.vader
2021-01-22 09:23:53 -06:00

29 lines
942 B
Text

Before:
call ale#assert#SetUpFixerTest('javascript', 'xo')
After:
call ale#assert#TearDownFixerTest()
Execute(The xo callback should return the correct default values):
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/xo/cli.js'))
\ . ' --fix %t',
\ }
Execute(The xo callback should include custom xo options):
let g:ale_javascript_xo_options = '--space'
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../eslint-test-files/react-app/node_modules/xo/cli.js'))
\ . ' --fix %t'
\ . ' --space',
\ }