Skip to content

Commit

Permalink
test(cookies): use test "httpsAgent" for self-signed certs
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Nov 16, 2023
1 parent c2d8e98 commit e163672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/node/rest-api/cookies-inheritance.node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import fetch from 'node-fetch'
import { HttpResponse, http } from 'msw'
import { setupServer, SetupServer } from 'msw/node'
import { HttpServer } from '@open-draft/test-server/http'
import { HttpServer, httpsAgent } from '@open-draft/test-server/http'
import { RequestHandler as ExpressRequestHandler } from 'express'

let server: SetupServer
Expand Down Expand Up @@ -60,6 +60,7 @@ afterAll(async () => {
test('inherits cookies set from a preceeding request', async () => {
const res = await fetch(httpServer.https.url('/login'), {
method: 'POST',
agent: httpsAgent,
}).then(() => {
// Fetch the user after requesting login to see
// if the response cookies set in the login request handler
Expand Down

0 comments on commit e163672

Please sign in to comment.