diff options
| author | crowlKats <13135287+crowlKats@users.noreply.github.com> | 2020-11-25 15:17:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-25 15:17:46 +0100 |
| commit | d40b0711a786d04b5e6321ae9bbf73c11220e865 (patch) | |
| tree | 77f59e4441108bd4659ef12e193f74389c04a9c5 /cli/tests/unit/websocket_test.ts | |
| parent | fb13967d1dd3aa7cc216b3f977a06d9718ae3678 (diff) | |
fix(websocket): Fix PermissionDenied error being caught in constructor (#8402)
Diffstat (limited to 'cli/tests/unit/websocket_test.ts')
| -rw-r--r-- | cli/tests/unit/websocket_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/unit/websocket_test.ts b/cli/tests/unit/websocket_test.ts new file mode 100644 index 000000000..8e5726d44 --- /dev/null +++ b/cli/tests/unit/websocket_test.ts @@ -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, + ); +}); |
