mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Automatic update from web-platform-testsMerge pull request #10645 from csnardi/update-webidl2 Update webidl2.js to v10.2.1 -- wpt-commits: 9f5c74dc3a633802acaa93ac325b11fff8c739f1 wpt-pr: 10645 --HG-- rename : testing/web-platform/tests/resources/webidl2/test/syntax/idl/iterator.widl => testing/web-platform/tests/resources/webidl2/test/invalid/idl/iterator.widl rename : testing/web-platform/tests/resources/webidl2/test/invalid/idl/stringconstants.idl => testing/web-platform/tests/resources/webidl2/test/invalid/idl/stringconstants.widl rename : testing/web-platform/tests/resources/webidl2/test/syntax/idl/typedef-union.idl => testing/web-platform/tests/resources/webidl2/test/syntax/idl/typedef-union.widl
20 lines
671 B
JavaScript
20 lines
671 B
JavaScript
// NOTES:
|
|
// - the errors actually still need to be reviewed to check that they
|
|
// are fully correct interpretations of the IDLs
|
|
|
|
"use strict";
|
|
|
|
const { collect } = require("./util/collect");
|
|
const fs = require("fs");
|
|
const expect = require("expect");
|
|
|
|
describe("Parses all of the invalid IDLs to check that they blow up correctly", () => {
|
|
for (const test of collect("invalid", { expectError: true })) {
|
|
it(`should produce the right error for ${test.path}`, () => {
|
|
const err = test.readJSON();
|
|
expect(test.error).toBeTruthy();
|
|
expect(test.error.message).toEqual(err.message);
|
|
expect(test.error.line).toEqual(err.line);
|
|
});
|
|
}
|
|
});
|