diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-11-12 22:30:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-12 22:30:04 +0000 |
commit | 55e04836261c577804bae4bbf7a49c53022880bd (patch) | |
tree | f0d7ff29d700d6d707f07fe48b78714bb133d76f /cli/tests/integration/lsp_tests.rs | |
parent | 3a7abe6906c54f9c628215c2b71d67e8db25a519 (diff) |
fix(lsp): update tsconfig after refreshing settings on init (#21170)
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r-- | cli/tests/integration/lsp_tests.rs | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index 42cd11b3d..92b53b3b1 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -1915,7 +1915,9 @@ fn lsp_hover_unstable_disabled() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "console.log(Deno.dlopen);\n" + // IMPORTANT: If you change this API due to stabilization, also change it + // in the enabled test below. + "text": "type _ = Deno.ForeignLibraryInterface;\n" } })); let res = client.write_request( @@ -1924,7 +1926,7 @@ fn lsp_hover_unstable_disabled() { "textDocument": { "uri": "file:///a/file.ts" }, - "position": { "line": 0, "character": 19 } + "position": { "line": 0, "character": 14 } }), ); assert_eq!( @@ -1933,12 +1935,13 @@ fn lsp_hover_unstable_disabled() { "contents": [ { "language": "typescript", - "value": "any" - } + "value": "type Deno.ForeignLibraryInterface = /*unresolved*/ any", + }, + "", ], "range": { - "start": { "line": 0, "character": 17 }, - "end": { "line": 0, "character": 23 } + "start": { "line": 0, "character": 14 }, + "end": { "line": 0, "character": 37 } } }) ); @@ -1957,7 +1960,7 @@ fn lsp_hover_unstable_enabled() { "uri": "file:///a/file.ts", "languageId": "typescript", "version": 1, - "text": "console.log(Deno.ppid);\n" + "text": "type _ = Deno.ForeignLibraryInterface;\n" } })); let res = client.write_request( @@ -1966,7 +1969,7 @@ fn lsp_hover_unstable_enabled() { "textDocument": { "uri": "file:///a/file.ts" }, - "position": { "line": 0, "character": 19 } + "position": { "line": 0, "character": 14 } }), ); assert_eq!( @@ -1975,14 +1978,14 @@ fn lsp_hover_unstable_enabled() { "contents":[ { "language":"typescript", - "value":"const Deno.ppid: number" + "value":"interface Deno.ForeignLibraryInterface" }, - "The process ID of parent process of this instance of the Deno CLI.\n\n```ts\nconsole.log(Deno.ppid);\n```", - "\n\n*@category* - Runtime Environment", + "**UNSTABLE**: New API, yet to be vetted.\n\nA foreign library interface descriptor.", + "\n\n*@category* - FFI", ], "range":{ - "start":{ "line":0, "character":17 }, - "end":{ "line":0, "character":21 } + "start":{ "line":0, "character":14 }, + "end":{ "line":0, "character":37 } } }) ); |