Closed touhidurrr closed 5 months ago
1.0.13
Microsoft Windows NT 10.0.22631.0 x64
use this test:
import { describe, expect, test } from 'bun:test'; import { Elysia, t } from 'elysia'; describe('string schema', async () => { const app = new Elysia().patch('/test', async ({ body }) => body, { body: t.String() }); const res = await app.handle( new Request(`http://localhost/test`, { method: 'PATCH', body: 'hello', }) ); test('t.String() works', async () => { const body = await res.text(); expect(res.status).toBe(200); expect(body).toBeString(); expect(body).toBe('hello'); }); });
It works
It does not work
I wasted hours of my time only to realize this was a bug.
What version of Elysia.JS is running?
1.0.13
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
use this test:
What is the expected behavior?
It works
What do you see instead?
It does not work
Additional information
I wasted hours of my time only to realize this was a bug.