mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
Before:
|
|
Save g:ale_biome_options
|
|
Save g:ale_biome_fixer_apply_unsafe
|
|
|
|
let g:ale_biome_options = ''
|
|
let g:ale_biome_fixer_apply_unsafe = 0
|
|
|
|
call ale#assert#SetUpFixerTest('typescript', 'biome')
|
|
|
|
After:
|
|
call ale#assert#TearDownFixerTest()
|
|
|
|
Execute(The default biome command should be correct):
|
|
call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
|
|
|
|
AssertFixer
|
|
\ {
|
|
\ 'command': ale#Escape('biome')
|
|
\ . ' check --write --stdin-file-path %s'
|
|
\ }
|
|
|
|
Execute(Unsafe fixes can be applied via an option):
|
|
call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
|
|
let g:ale_biome_fixer_apply_unsafe = 1
|
|
|
|
AssertFixer
|
|
\ {
|
|
\ 'command': ale#Escape('biome')
|
|
\ . ' check --write --stdin-file-path %s --unsafe'
|
|
\ }
|
|
|
|
Execute(The fixer should accept options):
|
|
call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
|
|
let g:ale_biome_options = '--foobar'
|
|
|
|
AssertFixer
|
|
\ {
|
|
\ 'command': ale#Escape('biome')
|
|
\ . ' check --write --stdin-file-path %s --foobar',
|
|
\ }
|