Add DeclareExportAllDeclaration to ast-types

master
James Long 2016-12-30 15:07:35 -05:00
parent a6f1e79db1
commit 649e8a1efe
2 changed files with 5 additions and 6 deletions

View File

@ -6,6 +6,7 @@
},
"main": "./index.js",
"dependencies": {
"ast-types": "git+https://github.com/jlongster/ast-types.git",
"babylon": "git+https://github.com/jlongster/babylon.git#published",
"minimist": "^1.2.0",
"recast": "^0.11.18"

View File

@ -33,12 +33,12 @@ function run_spec(dirname) {
if (RUN_AST_TESTS) {
const source = read(dirname + '/' + filename);
const ast = parse(source);
const ast = removeEmptyStatements(parse(source));
let prettyprinted = false;
let ppast;
let pperr = null;
try {
ppast = parse(prettyprint(source, path));
ppast = removeEmptyStatements(parse(prettyprint(source, path)));
}
catch(e) {
pperr = e.stack;
@ -47,10 +47,8 @@ function run_spec(dirname) {
test(path + ' parse', () => {
expect(pperr).toBe(null);
expect(ppast).toBeDefined();
if(RUN_AST_TESTS === "1") {
if(ast.errors.length === 0) {
expect(removeEmptyStatements(ast)).toEqual(removeEmptyStatements(ppast));
}
if(ast.errors.length === 0) {
expect(ast).toEqual(ppast);
}
});
}