We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b5b598 commit 157e35fCopy full SHA for 157e35f
resources/test/tests/unit/basic.html
@@ -24,7 +24,12 @@
24
assert_equals(typeof WebIDL2.parse, "function");
25
}, 'WebIDL2 namespace should have a parse method');
26
test(function() {
27
- assert_throws(new TypeError(), function() { WebIDL2.parse("I'm a syntax error"); });
+ try {
28
+ WebIDL2.parse("I'm a syntax error");
29
+ throw new Error("Web IDL didn't throw");
30
+ } catch (e) {
31
+ assert_true(e.constructor.name === "WebIDLParseError");
32
+ }
33
}, 'WebIDL2 parse method should bail on incorrect WebIDL');
34
35
assert_equals(typeof WebIDL2.parse("interface Foo {};"), "object");
0 commit comments