blob: 3d2083e4bf121541f965284fd2aed13eb970283f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
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
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --apply %t'
\ }
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
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --apply-unsafe %t'
\ }
Execute(The fixer should accept options):
call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
let g:ale_biome_options = '--foobar'
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': ale#Escape('biome')
\ . ' check --apply --foobar %t',
\ }
|