Closed bogeychan closed 1 month ago
1.1.3
WSL Ubuntu
// test.test.ts import { Elysia } from "elysia"; import { describe, it, expect } from "bun:test"; describe("AOT", () => { it.each([ ["enabled", { aot: true }], ["disabled", { aot: false }], ])("aot %s should respond without error", async (_name, options) => { const app = new Elysia(options).get("/", () => { // noop }); const response = await app.handle(new Request("http://localhost/")); expect(response.status).toBe(200); }); });
bun test
Both tests pass:
✓ AOT > aot enabled should respond without error ✓ AOT > aot disabled should respond without error
aot: false test fails:
aot: false
✓ AOT > aot enabled should respond without error 11 | // noop 12 | }); 13 | 14 | const response = await app.handle(new Request("http://localhost/")); 15 | 16 | expect(response.status).toBe(200); ^ error: expect(received).toBe(expected) Expected: 200 Received: 500 ✗ AOT > aot disabled should respond without error
It fails with status code 500 because of this:
undefined is not an object (evaluating 'M[m]')
Should have been fixed with e946da4, published under 1.1.4
ty, works for me
What version of Elysia.JS is running?
1.1.3
What platform is your computer?
WSL Ubuntu
What steps can reproduce the bug?
What is the expected behavior?
Both tests pass:
What do you see instead?
aot: false
test fails:Additional information
It fails with status code 500 because of this: