summaryrefslogtreecommitdiff
path: root/test/fixers/test_biome_fixer_callback.vader
diff options
context:
space:
mode:
authorAkiomi Kamakura <akiomik@gmail.com>2024-01-14 21:11:14 +0900
committerGitHub <noreply@github.com>2024-01-14 21:11:14 +0900
commit8922478a83cd06bfe5b82eb45279649adc4ec046 (patch)
treeca079044e37108fc06678ed437b27c8ea4f8fbc5 /test/fixers/test_biome_fixer_callback.vader
parent531970533a51557ae6a4614ec6a2fbae243a6c6b (diff)
downloadale-8922478a83cd06bfe5b82eb45279649adc4ec046.zip
Add biome support for javascript (#4701)
Diffstat (limited to 'test/fixers/test_biome_fixer_callback.vader')
-rw-r--r--test/fixers/test_biome_fixer_callback.vader30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/fixers/test_biome_fixer_callback.vader b/test/fixers/test_biome_fixer_callback.vader
new file mode 100644
index 00000000..0cb4888e
--- /dev/null
+++ b/test/fixers/test_biome_fixer_callback.vader
@@ -0,0 +1,30 @@
+Before:
+ call ale#assert#SetUpFixerTest('javascript', 'biome')
+ runtime autoload/ale/handlers/biome.vim
+ set filetype=javascript
+
+After:
+ call ale#assert#TearDownFixerTest()
+
+Execute(The biome callback should return the correct default values):
+ call ale#test#SetFilename('../test-files/biome/src/test.js')
+
+ AssertFixer
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': (has('win32') ? 'node.exe ' : '')
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/biome/node_modules/.bin/biome'))
+ \ . ' check --apply %t',
+ \ }
+
+Execute(The biome callback should include custom biome options):
+ let b:ale_javascript_biome_options = '--organize-imports-enabled=true'
+ call ale#test#SetFilename('../test-files/biome/src/test.js')
+
+ AssertFixer
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': (has('win32') ? 'node.exe ' : '')
+ \ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/biome/node_modules/.bin/biome'))
+ \ . ' check --apply --organize-imports-enabled=true %t',
+ \ }