mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +00:00
fix: align DOMException API to the spec and add web platform testing of it. (#9106)
* fix: align DOMException API to the spec * test: fix test case 070_location * test(DOMException): disable "does not inherit from Error: class-side" test of WPT * test: remove test cases in deno codebase * docs: add note about skipped test
This commit is contained in:
parent
78c27e0923
commit
c75f92c4e2
5 changed files with 125 additions and 47 deletions
|
@ -1,18 +0,0 @@
|
|||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
import { assert, assertEquals, unitTest } from "./test_util.ts";
|
||||
|
||||
unitTest(function testDomError() {
|
||||
const de = new DOMException("foo", "bar");
|
||||
assert(de);
|
||||
assertEquals(de.message, "foo");
|
||||
assertEquals(de.name, "bar");
|
||||
assertEquals(de.code, 0);
|
||||
});
|
||||
|
||||
unitTest(function testKnownDomException() {
|
||||
const de = new DOMException("foo", "SyntaxError");
|
||||
assert(de);
|
||||
assertEquals(de.message, "foo");
|
||||
assertEquals(de.name, "SyntaxError");
|
||||
assertEquals(de.code, 12);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue