From 6bfcb9cdffb86bf1a3e6d26cd1964858ff4bc3dd Mon Sep 17 00:00:00 2001 From: Charles B Johnson Date: Wed, 8 Apr 2020 17:59:17 -0500 Subject: linters/xo: consolidate xo linters --- .../test_xots_command_callback.vader | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/command_callback/test_xots_command_callback.vader (limited to 'test/command_callback/test_xots_command_callback.vader') diff --git a/test/command_callback/test_xots_command_callback.vader b/test/command_callback/test_xots_command_callback.vader new file mode 100644 index 00000000..c614ad59 --- /dev/null +++ b/test/command_callback/test_xots_command_callback.vader @@ -0,0 +1,22 @@ +Before: + call ale#assert#SetUpLinterTest('typescript', 'xo') + call ale#test#SetFilename('testfile.ts') + unlet! b:executable + + runtime autoload/ale/handlers/xo.vim + +After: + call ale#assert#TearDownLinterTest() + +Execute(The XO executable should be called): + AssertLinter 'xo', ale#Escape('xo') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO executable should be configurable): + let b:ale_typescript_xo_executable = 'foobar' + + AssertLinter 'foobar', ale#Escape('foobar') . ' --reporter json --stdin --stdin-filename %s' + +Execute(The XO options should be configurable): + let b:ale_typescript_xo_options = '--wat' + + AssertLinter 'xo', ale#Escape('xo') . ' --wat --reporter json --stdin --stdin-filename %s' -- cgit v1.2.3 From 5fd5fa53051c3514917974d0ba57f18eb50dd37e Mon Sep 17 00:00:00 2001 From: Charles B Johnson Date: Tue, 19 Jan 2021 23:08:10 -0600 Subject: linters/xo: fix tests --- test/command_callback/test_xots_command_callback.vader | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/command_callback/test_xots_command_callback.vader') diff --git a/test/command_callback/test_xots_command_callback.vader b/test/command_callback/test_xots_command_callback.vader index c614ad59..cc38ff02 100644 --- a/test/command_callback/test_xots_command_callback.vader +++ b/test/command_callback/test_xots_command_callback.vader @@ -1,8 +1,9 @@ Before: call ale#assert#SetUpLinterTest('typescript', 'xo') - call ale#test#SetFilename('testfile.ts') + call ale#test#SetFilename('testfile.tsx') unlet! b:executable + set filetype=typescriptreact runtime autoload/ale/handlers/xo.vim After: -- cgit v1.2.3