mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 4f397167b4ed552a02201c92d363cfaecfe2c7f0
This commit is contained in:
parent
73b5bf201f
commit
84b40513c3
182 changed files with 4779 additions and 1937 deletions
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
const { collect } = require("./util/collect");
|
||||
const wp = require("../lib/webidl2");
|
||||
const writer = require("../lib/writer");
|
||||
const expect = require("expect");
|
||||
const debug = true;
|
||||
|
||||
describe("Rewrite and parses all of the IDLs to produce the same ASTs", () => {
|
||||
for (const test of collect("syntax")) {
|
||||
it(`should produce the same AST for ${test.path}`, () => {
|
||||
try {
|
||||
const diff = test.diff(wp.parse(writer.write(test.ast), test.opt));
|
||||
if (diff && debug) console.log(JSON.stringify(diff, null, 4));
|
||||
expect(diff).toBe(undefined);
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e.toString());
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue