Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d

This commit is contained in:
Josh Matthews 2017-06-19 19:07:14 -04:00 committed by Ms2ger
parent 3f07cfec7c
commit 578498ba24
4001 changed files with 159517 additions and 30260 deletions

View file

@ -4,7 +4,7 @@
// are fully correct interpretations of the IDLs
var wp = process.env.JSCOV ? require("../lib-cov/webidl2") : require("../lib/webidl2")
, expect = require("expect.js")
, expect = require("expect")
, pth = require("path")
, fs = require("fs")
;
@ -16,7 +16,7 @@ describe("Parses all of the invalid IDLs to check that they blow up correctly",
.map(function (it) { return pth.join(dir, it); })
, errors = idls.map(function (it) { return pth.join(__dirname, "invalid", "json", pth.basename(it).replace(/\.w?idl/, ".json")); })
;
for (var i = 0, n = idls.length; i < n; i++) {
var idl = idls[i], error = JSON.parse(fs.readFileSync(errors[i], "utf8"));
var func = (function (idl, err) {
@ -30,11 +30,11 @@ describe("Parses all of the invalid IDLs to check that they blow up correctly",
error = e;
}
finally {
expect(error).to.be.ok();
expect(error.message).to.equal(err.message);
expect(error.line).to.equal(err.line);
expect(error).toExist();
expect(error.message).toEqual(err.message);
expect(error.line).toEqual(err.line);
}
};
}(idl, error));
it("should produce the right error for " + idl, func);