summaryrefslogtreecommitdiff
path: root/test/linter
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter')
-rw-r--r--test/linter/test_typescript_deno_lsp.vader40
1 files changed, 38 insertions, 2 deletions
diff --git a/test/linter/test_typescript_deno_lsp.vader b/test/linter/test_typescript_deno_lsp.vader
index 88b2e036..944f6a0a 100644
--- a/test/linter/test_typescript_deno_lsp.vader
+++ b/test/linter/test_typescript_deno_lsp.vader
@@ -1,4 +1,5 @@
Before:
+ let g:ale_deno_importMap = 'import_map.json'
let g:ale_deno_unstable = 0
let g:ale_deno_executable = 'deno'
let g:ale_deno_lsp_project_root = ''
@@ -13,7 +14,8 @@ Execute(Should set deno lsp for TypeScript projects using stable Deno API):
AssertLSPOptions {
\ 'enable': v:true,
\ 'lint': v:true,
- \ 'unstable': v:false
+ \ 'unstable': v:false,
+ \ 'importMap': ''
\}
Execute(Should set deno lsp using unstable Deno API if enabled by user):
@@ -22,7 +24,41 @@ Execute(Should set deno lsp using unstable Deno API if enabled by user):
AssertLSPOptions {
\ 'enable': v:true,
\ 'lint': v:true,
- \ 'unstable': v:true
+ \ 'unstable': v:true,
+ \ 'importMap': ''
+ \}
+
+Execute(Should set the default importMap filepath):
+ call ale#test#SetFilename('../test-files/typescript/test.ts')
+
+ AssertLSPOptions {
+ \ 'enable': v:true,
+ \ 'lint': v:true,
+ \ 'unstable': v:false,
+ \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/import_map.json')
+ \}
+
+Execute(Should set the importMap filepath from user defined importMap):
+ let g:ale_deno_importMap = 'custom_import_map.json'
+ call ale#test#SetFilename('../test-files/typescript/test.ts')
+
+ AssertLSPOptions {
+ \ 'enable': v:true,
+ \ 'lint': v:true,
+ \ 'unstable': v:false,
+ \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/custom_import_map.json')
+ \}
+
+Execute(Should set the importMap filepath from user defined importMap with unstable API):
+ let g:ale_deno_importMap = 'custom_import_map.json'
+ let g:ale_deno_unstable = 1
+ call ale#test#SetFilename('../test-files/typescript/test.ts')
+
+ AssertLSPOptions {
+ \ 'enable': v:true,
+ \ 'lint': v:true,
+ \ 'unstable': v:true,
+ \ 'importMap': ale#path#Simplify(g:dir . '/../test-files/typescript/custom_import_map.json')
\}
Execute(Should find project root containing tsconfig.json):