Bug Report
Input Code
const input = ``;
const out = babel.transformSync(input, {
configFile: false,
plugins: [
function() {
return {
visitor: {
Program(path) {
try {
path.pushContainer("body", this.addHelper("fooBar"));
} catch {}
path.pushContainer("body", this.addHelper("fooBar"));
},
},
};
},
],
});
console.log(out.code);
Expected behavior/code
It should fail, because the second addHelper call should throw.
*Actual behavior
Environment
- Babel version(s): 7.5.0
- Node/npm version: [e.g. Node 8/npm 5]
- OS: [e.g. OSX 10.13.4, Windows 10]
- Monorepo: [e.g. yes/no/Lerna]
- How you are using Babel: [e.g.
cli, register, loader]
Bug Report
Input Code
Expected behavior/code
It should fail, because the second
addHelpercall should throw.*Actual behavior
_fooBarEnvironment
cli,register,loader]