Re-add parseNoPatch function (accidentally removed) (babel/babel-eslint#557)

This commit is contained in:
Teddy Katz 2017-12-24 02:00:29 -05:00
parent 5d6d52f04e
commit d33839a9c3
2 changed files with 13 additions and 0 deletions

View File

@ -15,3 +15,7 @@ exports.parseForESLint = function(code, options) {
patched = true;
return { ast: require("./parse-with-patch")(code, options) };
};
exports.parseNoPatch = function(code, options) {
return require("./parse")(code, options);
};

View File

@ -531,3 +531,12 @@ describe("babylon-to-esprima", () => {
});
});
});
describe("Public API", () => {
it("exports a parseNoPatch function", () => {
assertImplementsAST(
espree.parse("foo"),
babelEslint.parseNoPatch("foo", {})
);
});
});