X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/fixers/test_stylelint_fixer_callback.vader diff --git a/.vim/bundle/ale/test/fixers/test_stylelint_fixer_callback.vader b/.vim/bundle/ale/test/fixers/test_stylelint_fixer_callback.vader new file mode 100644 index 00000000..ee7cfdd4 --- /dev/null +++ b/.vim/bundle/ale/test/fixers/test_stylelint_fixer_callback.vader @@ -0,0 +1,34 @@ +Before: + Save g:ale_stylelint_options + + let g:ale_stylelint_options = '' + + call ale#assert#SetUpFixerTest('css', 'stylelint') + +After: + call ale#assert#TearDownFixerTest() + +Execute(The stylelint callback should return the correct default values): + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css') + + AssertFixer + \ { + \ 'read_temporary_file': 0, + \ 'cwd': '%s:h', + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js')) + \ . ' --fix --stdin --stdin-filename %s', + \ } + +Execute(The stylelint callback should include custom stylelint options): + let g:ale_stylelint_options = '--cache' + call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css') + + AssertFixer + \ { + \ 'read_temporary_file': 0, + \ 'cwd': '%s:h', + \ 'command': (has('win32') ? 'node.exe ' : '') + \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js')) + \ . ' --cache --fix --stdin --stdin-filename %s', + \ }