Skip to content

Commit

Permalink
refactor(test): replace features to be removed in v4 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuapp authored Feb 5, 2024
1 parent 3a9ec60 commit 1d75d95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Hono } from 'hono'
import { basicAuth } from 'hono/basic-auth'
import { compress } from 'hono/compress'
import { poweredBy } from 'hono/powered-by'
import { stream } from 'hono/streaming'
import request from 'supertest'
import { createAdaptorServer } from '../src/server'
import type { HttpBindings } from '../src/types'
Expand Down Expand Up @@ -356,7 +357,7 @@ describe('Stream and non-stream response', () => {
app.get('/json-stream', (c) => {
c.header('x-accel-buffering', 'no')
c.header('content-type', 'application/json')
return c.stream(async (stream) => {
return stream(c, async (stream) => {
stream.write(JSON.stringify({ foo: 'bar' }))
})
})
Expand Down
3 changes: 2 additions & 1 deletion test/vercel.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Hono } from 'hono'
import { showRoutes } from 'hono/dev'
import request from 'supertest'
import { handle } from '../src/vercel'

Expand Down Expand Up @@ -56,7 +57,7 @@ describe('Routing', () => {
const app = new Hono()
app.route('/v2', book)

app.showRoutes()
showRoutes(app)

const server = handle(app)

Expand Down

0 comments on commit 1d75d95

Please sign in to comment.