From 9b362634f7210657d94870b017e969bdcdda8de0 Mon Sep 17 00:00:00 2001 From: Mohammed Chelouti <70812484+motato1@users.noreply.github.com> Date: Tue, 29 Dec 2020 21:46:02 +0100 Subject: feat: Add Deno lsp support --- .../test_typescript_deno_lsp.vader | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 test/command_callback/test_typescript_deno_lsp.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_typescript_deno_lsp.vader b/test/command_callback/test_typescript_deno_lsp.vader new file mode 100644 index 00000000..b6e4db0e --- /dev/null +++ b/test/command_callback/test_typescript_deno_lsp.vader @@ -0,0 +1,61 @@ +Before: + let g:ale_deno_unstable = 0 + let g:ale_deno_executable = 'deno' + let g:ale_deno_project_root = '' + + runtime autoload/ale/handlers/deno.vim + call ale#assert#SetUpLinterTest('typescript', 'deno') + +After: + call ale#assert#TearDownLinterTest() + +Execute(Should set deno lsp for TypeScript projects using stable Deno API): + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../..') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + +Execute(Should set deno lsp using unstable Deno API if enabled by user): + let g:ale_deno_unstable = 1 + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../..') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:true + \} + +Execute(Should find project root containing tsconfig.json): + call ale#test#SetFilename('../typescript/test.ts') + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject ale#path#Simplify(g:dir . '/../typescript') + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + +Execute(Should use user-specified project root): + let g:ale_deno_lsp_project_root = '/' + + call ale#test#SetFilename('../typescript/test.ts') + AssertLSPLanguage 'typescript' + AssertLSPConfig {} + AssertLSPProject '/' + AssertLSPOptions { + \ 'enable': v:true, + \ 'lint': v:true, + \ 'unstable': v:false + \} + + +Execute(Check Deno LSP command): + AssertLinter 'deno', [ + \ ale#Escape('deno') . ' lsp', + \] -- cgit v1.2.3 From e16c3b09f74dfa6c096fb50c8cd09b1974e75fb0 Mon Sep 17 00:00:00 2001 From: Mohammed Chelouti <70812484+motato1@users.noreply.github.com> Date: Mon, 11 Jan 2021 21:55:17 +0100 Subject: doc: Add documentation for Deno --- test/command_callback/test_typescript_deno_lsp.vader | 1 - 1 file changed, 1 deletion(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_typescript_deno_lsp.vader b/test/command_callback/test_typescript_deno_lsp.vader index b6e4db0e..01cbc851 100644 --- a/test/command_callback/test_typescript_deno_lsp.vader +++ b/test/command_callback/test_typescript_deno_lsp.vader @@ -54,7 +54,6 @@ Execute(Should use user-specified project root): \ 'unstable': v:false \} - Execute(Check Deno LSP command): AssertLinter 'deno', [ \ ale#Escape('deno') . ' lsp', -- cgit v1.2.3