mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
fix ENG-21528 (#24865)
### What does this PR do? Makes sure we are creating error messages with an allocator that will not `deinit` at the end of function scope on error. fixes ENG-21528 ### How did you verify your code works? Added a test
This commit is contained in:
@@ -101,6 +101,12 @@ describe("Bun.Transpiler", () => {
|
||||
hideFromStackTrace(ts.expectPrinted);
|
||||
hideFromStackTrace(ts.expectParseError);
|
||||
|
||||
it("handles errors when parsing macros", () => {
|
||||
expect(() => {
|
||||
new Bun.Transpiler({ macro: "hi" });
|
||||
}).toThrow("Unexpected hi");
|
||||
});
|
||||
|
||||
it("normalizes \\r\\n", () => {
|
||||
ts.expectPrinted_("console.log(`\r\n\r\n\r\n`)", "console.log(`\n\n\n`);\n");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user