Skip to content

Commit

Permalink
bump deps and proper type cast in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Dec 3, 2022
1 parent 6bed541 commit d1309ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConnInfo } from 'https://deno.land/std@0.148.0/http/server.ts'
import { ConnInfo } from 'https://deno.land/std@0.167.0/http/server.ts'

export type RequestWithConnection = Request & { conn: ConnInfo }

Expand Down
4 changes: 2 additions & 2 deletions mod_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RequestWithConnection } from './mod.ts'
import { forwarded } from './mod.ts'
import { ConnInfo } from 'https://deno.land/std@0.148.0/http/server.ts'
import { ConnInfo } from 'https://deno.land/std@0.167.0/http/server.ts'
import { describe, it, expect, run } from 'https://deno.land/x/[email protected]/mod.ts'

const createReq = (hostname: string, headers?: Record<string, string>): RequestWithConnection =>
Expand All @@ -13,7 +13,7 @@ const createReq = (hostname: string, headers?: Record<string, string>): RequestW
}
} as ConnInfo,
headers: new Headers(headers || {})
} as any)
} as unknown as RequestWithConnection)

describe('forwarded(req)', () => {
it('should work with `X-Forwarded-For` header', () => {
Expand Down

0 comments on commit d1309ab

Please sign in to comment.