]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/linter/test_biome.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Do not set EDITOR/VISUAL for shell
[etc/vim.git] / .vim / bundle / ale / test / linter / test_biome.vader
1 Before:
2   Save g:ale_biome_options
3   Save g:ale_biome_lsp_project_root
4
5   let g:ale_biome_options = ''
6   let g:ale_biome_lsp_project_root = ''
7
8   call ale#assert#SetUpLinterTest('typescript', 'biome')
9   call ale#test#SetFilename('test.ts')
10
11 After:
12   call ale#assert#TearDownLinterTest()
13
14 Execute(The default biome command should be correct):
15   AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy'
16
17 Execute(Uses the filetype as the language):
18   call ale#test#SetFilename('test.ts')
19   set filetype=typescript
20   AssertLSPLanguage 'typescript'
21
22   call ale#test#SetFilename('test.tsx')
23   set filetype=typescriptreact
24   AssertLSPLanguage 'typescriptreact'
25
26   call ale#test#SetFilename('test.js')
27   set filetype=javascript
28   AssertLSPLanguage 'javascript'
29
30   call ale#test#SetFilename('test.jsx')
31   set filetype=javascriptreact
32   AssertLSPLanguage 'javascriptreact'
33
34 Execute(Should find project root containing biome.json):
35   call ale#test#SetFilename('../test-files/biome/json/src/test.ts')
36
37   AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/biome/json')
38
39 Execute(Should find project root containing biome.jsonc):
40   call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
41
42   AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/biome/jsonc')
43
44 Execute(Should use user-specified project root):
45   let g:ale_biome_lsp_project_root = '/'
46
47   call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
48
49   AssertLSPProject '/'