update babylon fixtures to use File as the root node rather than Program

This commit is contained in:
Sebastian McKenzie
2015-07-25 05:24:58 +01:00
parent b088f8e6ef
commit 006f3db76a
800 changed files with 121059 additions and 73665 deletions

View File

@@ -23,7 +23,7 @@ function runTest(test) {
opts.locations = true;
try {
var ast = parse(test.actual.code, opts).program;
var ast = parse(test.actual.code, opts);
} catch (err) {
if (opts.throws) {
if (err.message === opts.throws) {
@@ -42,6 +42,7 @@ function runTest(test) {
} else {
var mis = misMatch(JSON.parse(test.expect.code), ast);
if (mis) {
//delete ast.tokens;
//require("fs").writeFileSync(test.expect.loc, JSON.stringify(ast, null, " "));
throw new Error(mis);
}