Skip to content

Commit

Permalink
fix: typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 17, 2023
1 parent 0b99ef9 commit 0ec2dee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test_utils/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import Macroable from '@poppinss/macroable'
import { IncomingMessage, ServerResponse } from 'node:http'

import { HttpServerUtils } from './http.js'
import { CookieClient } from '../../modules/http/main.js'
import type { ApplicationService } from '../types.js'
import { CookieClient, type HttpContext } from '../../modules/http/main.js'

/**
* Test utils has a collection of helper methods to make testing
Expand Down Expand Up @@ -57,7 +57,9 @@ export class TestUtils extends Macroable {
/**
* Create an instance of HTTP context for testing
*/
async createHttpContext(options: { req?: IncomingMessage; res?: ServerResponse } = {}) {
async createHttpContext(
options: { req?: IncomingMessage; res?: ServerResponse } = {}
): Promise<HttpContext> {
const req = options.req || new IncomingMessage(new Socket())
const res = options.res || new ServerResponse(req)
const server = await this.app.container.make('server')
Expand Down

0 comments on commit 0ec2dee

Please sign in to comment.