Skip to content

Commit

Permalink
chore: add back babel-core api test
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulAli19 committed Dec 10, 2019
1 parent 1a1b51c commit b2fd90b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/babel-core/test/api.js
Expand Up @@ -754,6 +754,23 @@ describe("api", function() {
babelrc: false,
};

it("only syntax plugin available", function(done) {
transformFile(
__dirname + "/fixtures/api/parsing-errors/only-syntax/file.js",
options,
function(err) {
expect(err.message).toMatch(
"Support for the experimental syntax 'pipelineOperator' isn't currently enabled (1:3):",
);
expect(err.message).toMatch(
"Add @babel/plugin-proposal-pipeline-operator (https://git.io/vb4SU) to the " +
"'plugins' section of your Babel config to enable transformation.",
);
done();
},
);
});

it("both syntax and transform plugin available", function(done) {
transformFile(
__dirname + "/fixtures/api/parsing-errors/syntax-and-transform/file.js",
Expand Down
@@ -0,0 +1 @@
a |> b

0 comments on commit b2fd90b

Please sign in to comment.