mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
fix(web): implement DOMException#code (#9015)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
This commit is contained in:
parent
f3ead9c6a7
commit
9637209765
4 changed files with 56 additions and 18 deletions
|
@ -6,4 +6,13 @@ unitTest(function testDomError() {
|
|||
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