File: test_biome.vader

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (49 lines) | stat: -rw-r--r-- 1,453 bytes parent folder | download
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
44
45
46
47
48
49
Before:
  Save g:ale_biome_options
  Save g:ale_biome_lsp_project_root

  let g:ale_biome_options = ''
  let g:ale_biome_lsp_project_root = ''

  call ale#assert#SetUpLinterTest('typescript', 'biome')
  call ale#test#SetFilename('test.ts')

After:
  call ale#assert#TearDownLinterTest()

Execute(The default biome command should be correct):
  AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy'

Execute(Uses the filetype as the language):
  call ale#test#SetFilename('test.ts')
  set filetype=typescript
  AssertLSPLanguage 'typescript'

  call ale#test#SetFilename('test.tsx')
  set filetype=typescriptreact
  AssertLSPLanguage 'typescriptreact'

  call ale#test#SetFilename('test.js')
  set filetype=javascript
  AssertLSPLanguage 'javascript'

  call ale#test#SetFilename('test.jsx')
  set filetype=javascriptreact
  AssertLSPLanguage 'javascriptreact'

Execute(Should find project root containing biome.json):
  call ale#test#SetFilename('../test-files/biome/json/src/test.ts')

  AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/biome/json')

Execute(Should find project root containing biome.jsonc):
  call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')

  AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/biome/jsonc')

Execute(Should use user-specified project root):
  let g:ale_biome_lsp_project_root = '/'

  call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')

  AssertLSPProject '/'