Skip to content

Commit 58b00f1

Browse files
committed
fix: breaking test
1 parent 8187ed5 commit 58b00f1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/request.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import supertest from 'supertest'
1111
import { test } from '@japa/runner'
1212
import { createCertificate } from 'pem'
1313
import { createServer } from 'node:http'
14+
import Middleware from '@poppinss/middleware'
1415
import { createServer as httpsServer } from 'node:https'
1516

1617
import { RequestFactory } from '../test_factories/request.js'
@@ -747,9 +748,13 @@ test.group('Request', () => {
747748
const server = createServer((req, res) => {
748749
const request = new RequestFactory().merge({ req, res, encryption }).create()
749750
request.ctx = new HttpContextFactory().merge({ request }).create()
750-
;(request.ctx.route as any) = {
751+
request.ctx.route = {
752+
middleware: new Middleware(),
753+
meta: {},
754+
name: '',
755+
execute: () => {},
751756
pattern: '/users/:id',
752-
handler: { name: '#controllers/user', handle: () => {} },
757+
handler: { reference: '#controllers/user', handle: () => {} },
753758
}
754759

755760
res.writeHead(200, { 'content-type': 'application/json' })

0 commit comments

Comments
 (0)