deno.land / std@0.166.0 / node / internal / errors_test.ts

errors_test.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.import { NodeRangeError, NodeSyntaxError, NodeTypeError, NodeURIError,} from "./errors.ts";import { assertEquals } from "../../testing/asserts.ts";
Deno.test("NodeSyntaxError string representation", () => { assertEquals( String(new NodeSyntaxError("CODE", "MESSAGE")), "SyntaxError [CODE]: MESSAGE", );});
Deno.test("NodeRangeError string representation", () => { assertEquals( String(new NodeRangeError("CODE", "MESSAGE")), "RangeError [CODE]: MESSAGE", );});
Deno.test("NodeTypeError string representation", () => { assertEquals( String(new NodeTypeError("CODE", "MESSAGE")), "TypeError [CODE]: MESSAGE", );});
Deno.test("NodeURIError string representation", () => { assertEquals( String(new NodeURIError("CODE", "MESSAGE")), "URIError [CODE]: MESSAGE", );});
std

Version Info

Tagged at
a year ago