From 979272eca2806b328223846b0fa0521559da1078 Mon Sep 17 00:00:00 2001 From: Colin Casey Date: Sun, 4 Dec 2022 13:48:57 -0400 Subject: [PATCH] Update `tough-cookie` dependency (#2184) --- package.json | 2 +- test/cookies.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d56c90efa..4eb0ba201 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "tempy": "^3.0.0", "then-busboy": "^5.2.1", "to-readable-stream": "^3.0.0", - "tough-cookie": "4.0.0", + "tough-cookie": "4.1.2", "ts-node": "^10.8.2", "type-fest": "^3.0.0", "typescript": "~4.8.2", diff --git a/test/cookies.ts b/test/cookies.ts index 9b324b108..e46aa9963 100644 --- a/test/cookies.ts +++ b/test/cookies.ts @@ -57,7 +57,7 @@ test('cookies doesn\'t break on redirects', withServer, async (t, server, got) = test('throws on invalid cookies', withServer, async (t, server, got) => { server.get('/', (_request, response) => { - response.setHeader('set-cookie', 'hello=world; domain=localhost'); + response.setHeader('set-cookie', 'invalid cookie; domain=localhost'); response.end(); }); @@ -65,13 +65,13 @@ test('throws on invalid cookies', withServer, async (t, server, got) => { await t.throwsAsync(got({cookieJar}), { instanceOf: RequestError, - message: 'Cookie has domain set to a public suffix', + message: 'Cookie failed to parse', }); }); test('does not throw on invalid cookies when options.ignoreInvalidCookies is set', withServer, async (t, server, got) => { server.get('/', (_request, response) => { - response.setHeader('set-cookie', 'hello=world; domain=localhost'); + response.setHeader('set-cookie', 'invalid cookie; domain=localhost'); response.end(); });