Update web-platform-tests to revision 7da6acfd668e66adae5ab4e2d389810d3b1460be

This commit is contained in:
James Graham 2015-10-05 17:15:15 +01:00
parent 50db64a20e
commit bae87d193d
307 changed files with 35826 additions and 209 deletions

View file

@ -17,11 +17,16 @@ describe("Parses all of the IDLs to produce the correct ASTs", function () {
for (var i = 0, n = idls.length; i < n; i++) {
var idl = idls[i], json = jsons[i];
var func = (function (idl, json) {
return function () {
try {
var optFile = pth.join(__dirname, "syntax/opt", pth.basename(json));
var opt = undefined;
if (fs.existsSync(optFile))
opt = JSON.parse(fs.readFileSync(optFile, "utf8"));
var diff = jdp.diff(JSON.parse(fs.readFileSync(json, "utf8")),
wp.parse(fs.readFileSync(idl, "utf8")));
wp.parse(fs.readFileSync(idl, "utf8"), opt));
if (diff && debug) console.log(JSON.stringify(diff, null, 4));
expect(diff).to.be(undefined);
}