Add DeclareExportAllDeclaration to ast-types
parent
a6f1e79db1
commit
649e8a1efe
|
@ -6,6 +6,7 @@
|
||||||
},
|
},
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"ast-types": "git+https://github.com/jlongster/ast-types.git",
|
||||||
"babylon": "git+https://github.com/jlongster/babylon.git#published",
|
"babylon": "git+https://github.com/jlongster/babylon.git#published",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
"recast": "^0.11.18"
|
"recast": "^0.11.18"
|
||||||
|
|
|
@ -33,12 +33,12 @@ function run_spec(dirname) {
|
||||||
|
|
||||||
if (RUN_AST_TESTS) {
|
if (RUN_AST_TESTS) {
|
||||||
const source = read(dirname + '/' + filename);
|
const source = read(dirname + '/' + filename);
|
||||||
const ast = parse(source);
|
const ast = removeEmptyStatements(parse(source));
|
||||||
let prettyprinted = false;
|
let prettyprinted = false;
|
||||||
let ppast;
|
let ppast;
|
||||||
let pperr = null;
|
let pperr = null;
|
||||||
try {
|
try {
|
||||||
ppast = parse(prettyprint(source, path));
|
ppast = removeEmptyStatements(parse(prettyprint(source, path)));
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
pperr = e.stack;
|
pperr = e.stack;
|
||||||
|
@ -47,10 +47,8 @@ function run_spec(dirname) {
|
||||||
test(path + ' parse', () => {
|
test(path + ' parse', () => {
|
||||||
expect(pperr).toBe(null);
|
expect(pperr).toBe(null);
|
||||||
expect(ppast).toBeDefined();
|
expect(ppast).toBeDefined();
|
||||||
if(RUN_AST_TESTS === "1") {
|
|
||||||
if(ast.errors.length === 0) {
|
if(ast.errors.length === 0) {
|
||||||
expect(removeEmptyStatements(ast)).toEqual(removeEmptyStatements(ppast));
|
expect(ast).toEqual(ppast);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue