summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/lsp_tests.rs20
-rw-r--r--tests/specs/check/unstable_suggestion/main.out11
-rw-r--r--tests/specs/check/unstable_suggestion/main.ts5
3 files changed, 17 insertions, 19 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index 981dcc01d..8fb64defd 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -2143,7 +2143,7 @@ fn lsp_hover_unstable_always_enabled() {
"version": 1,
// IMPORTANT: If you change this API due to stabilization, also change it
// in the enabled test below.
- "text": "type _ = Deno.ForeignLibraryInterface;\n"
+ "text": "type _ = Deno.DatagramConn;\n"
}
}));
let res = client.write_request(
@@ -2161,14 +2161,14 @@ fn lsp_hover_unstable_always_enabled() {
"contents":[
{
"language":"typescript",
- "value":"interface Deno.ForeignLibraryInterface"
+ "value":"interface Deno.DatagramConn"
},
- "**UNSTABLE**: New API, yet to be vetted.\n\nA foreign library interface descriptor.",
- "\n\n*@category* - FFI \n\n*@experimental*",
+ "**UNSTABLE**: New API, yet to be vetted.\n\nA generic transport listener for message-oriented protocols.",
+ "\n\n*@category* - Network \n\n*@experimental*",
],
"range":{
"start":{ "line":0, "character":14 },
- "end":{ "line":0, "character":37 }
+ "end":{ "line":0, "character":26 }
}
})
);
@@ -2188,7 +2188,7 @@ fn lsp_hover_unstable_enabled() {
"uri": "file:///a/file.ts",
"languageId": "typescript",
"version": 1,
- "text": "type _ = Deno.ForeignLibraryInterface;\n"
+ "text": "type _ = Deno.DatagramConn;\n"
}
}));
let res = client.write_request(
@@ -2206,14 +2206,14 @@ fn lsp_hover_unstable_enabled() {
"contents":[
{
"language":"typescript",
- "value":"interface Deno.ForeignLibraryInterface"
+ "value":"interface Deno.DatagramConn"
},
- "**UNSTABLE**: New API, yet to be vetted.\n\nA foreign library interface descriptor.",
- "\n\n*@category* - FFI \n\n*@experimental*",
+ "**UNSTABLE**: New API, yet to be vetted.\n\nA generic transport listener for message-oriented protocols.",
+ "\n\n*@category* - Network \n\n*@experimental*",
],
"range":{
"start":{ "line":0, "character":14 },
- "end":{ "line":0, "character":37 }
+ "end":{ "line":0, "character":26 }
}
})
);
diff --git a/tests/specs/check/unstable_suggestion/main.out b/tests/specs/check/unstable_suggestion/main.out
index ba8b2800c..9926c9e3c 100644
--- a/tests/specs/check/unstable_suggestion/main.out
+++ b/tests/specs/check/unstable_suggestion/main.out
@@ -1,10 +1,5 @@
Check file:///[WILDLINE]main.ts
-error: TS2551 [ERROR]: Property 'dlopen' does not exist on type 'typeof Deno'. Did you mean 'open'? 'Deno.dlopen' is an unstable API. Did you mean 'open'? If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
-Deno.dlopen("path/to/lib", {});
- ~~~~~~
+error: TS2339 [ERROR]: Property 'listenDatagram' does not exist on type 'typeof Deno'. 'Deno.listenDatagram' is an unstable API. If not, try changing the 'lib' compiler option to include 'deno.unstable' or add a triple-slash directive to the top of your entrypoint (main file): /// <reference lib="deno.unstable" />
+Deno.listenDatagram({
+ ~~~~~~~~~~~~~~
at file:///[WILDLINE]/main.ts:5:6
-
- 'open' is declared here.
- export function open(
- ~~~~
- at asset:///lib.deno.ns.d.ts:[WILDLINE]
diff --git a/tests/specs/check/unstable_suggestion/main.ts b/tests/specs/check/unstable_suggestion/main.ts
index 02a5cfbdf..c5c7a82e1 100644
--- a/tests/specs/check/unstable_suggestion/main.ts
+++ b/tests/specs/check/unstable_suggestion/main.ts
@@ -2,4 +2,7 @@
/// <reference lib="deno.ns" />
// unstable apis removed here, so should error
-Deno.dlopen("path/to/lib", {});
+Deno.listenDatagram({
+ port: 3000,
+ transport: "udp",
+});