make errors easier to track down

pull/769/head
Rich Harris 7 years ago
parent 0f7e87c804
commit 9b9aa0416f

@ -52,7 +52,7 @@ describe("js", () => {
} }
] ]
}).then(bundle => { }).then(bundle => {
return bundle.generate({ format: "es" }) return bundle.generate({ format: "es" });
}).then(({ code }) => { }).then(({ code }) => {
fs.writeFileSync(`${dir}/_actual-bundle.js`, code); fs.writeFileSync(`${dir}/_actual-bundle.js`, code);
@ -65,6 +65,9 @@ describe("js", () => {
code.trim().replace(/^\s+$/gm, ""), code.trim().replace(/^\s+$/gm, ""),
expectedBundle.trim().replace(/^\s+$/gm, "") expectedBundle.trim().replace(/^\s+$/gm, "")
); );
}).catch(err => {
console.error(err.loc);
throw err;
}); });
}); });
}); });

Loading…
Cancel
Save