mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 06:31:15 +00:00
fix(websocket): Fix PermissionDenied error being caught in constructor (#8402)
This commit is contained in:
parent
fb13967d1d
commit
d40b0711a7
4 changed files with 45 additions and 2 deletions
|
@ -79,3 +79,4 @@ import "./write_file_test.ts";
|
|||
import "./write_text_file_test.ts";
|
||||
import "./performance_test.ts";
|
||||
import "./version_test.ts";
|
||||
import "./websocket_test.ts";
|
||||
|
|
9
cli/tests/unit/websocket_test.ts
Normal file
9
cli/tests/unit/websocket_test.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertThrows, unitTest } from "./test_util.ts";
|
||||
|
||||
unitTest(function websocketPermissionless() {
|
||||
assertThrows(
|
||||
() => new WebSocket("ws://localhost"),
|
||||
Deno.errors.PermissionDenied,
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue