Skip to content

Commit 4a01e51

Browse files
committed
fix test
1 parent 2966a0b commit 4a01e51

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/server/test/adapter/hono.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Hono, MiddlewareHandler } from 'hono';
33
import superjson from 'superjson';
44
import { describe, expect, it } from 'vitest';
55
import { createHonoHandler } from '../../src/adapter/hono';
6-
import { RPCApiHandler } from '../../src/api';
6+
import { RestApiHandler, RPCApiHandler } from '../../src/api';
77
import { makeUrl, schema } from '../utils';
88

99
describe('Hono adapter tests - rpc handler', () => {
@@ -86,20 +86,13 @@ describe('Hono adapter tests - rest handler', () => {
8686
const handler = await createHonoApp(
8787
createHonoHandler({
8888
getClient: () => client,
89-
apiHandler: new RPCApiHandler({ schema: client.$schema }),
89+
apiHandler: new RestApiHandler({ endpoint: 'http://localhost/api', schema: client.$schema }),
9090
})
9191
);
9292

9393
let r = await handler(makeRequest('GET', makeUrl('/api/post/1')));
9494
expect(r.status).toBe(404);
9595

96-
r = await handler(
97-
makeRequest('POST', '/api/user')
98-
);
99-
100-
r = await handler(makeRequest('GET', makeUrl('/api/post/1')));
101-
expect(r.status).toBe(404);
102-
10396
r = await handler(
10497
makeRequest('POST', '/api/user', {
10598
data: {

0 commit comments

Comments
 (0)