Skip to content

Commit

Permalink
add: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Celesca committed Nov 20, 2024
1 parent 1073bb7 commit f3a5220
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// test/index.test.ts
import { describe, expect, it } from 'bun:test'
import { Elysia } from 'elysia'

describe('Elysia', () => {
it('return a response', async () => {
const app = new Elysia().get('/', () => 'Hello Elysia')

const response = await app
.handle(new Request('http://localhost/'))
.then((res) => res.text())

expect(response).toBe('Hello Elysia')
})
})

0 comments on commit f3a5220

Please sign in to comment.