Skip to content

Commit 979272e

Browse files
authoredDec 4, 2022
Update tough-cookie dependency (#2184)
1 parent fd75360 commit 979272e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"tempy": "^3.0.0",
9898
"then-busboy": "^5.2.1",
9999
"to-readable-stream": "^3.0.0",
100-
"tough-cookie": "4.0.0",
100+
"tough-cookie": "4.1.2",
101101
"ts-node": "^10.8.2",
102102
"type-fest": "^3.0.0",
103103
"typescript": "~4.8.2",

‎test/cookies.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,21 @@ test('cookies doesn\'t break on redirects', withServer, async (t, server, got) =
5757

5858
test('throws on invalid cookies', withServer, async (t, server, got) => {
5959
server.get('/', (_request, response) => {
60-
response.setHeader('set-cookie', 'hello=world; domain=localhost');
60+
response.setHeader('set-cookie', 'invalid cookie; domain=localhost');
6161
response.end();
6262
});
6363

6464
const cookieJar = new toughCookie.CookieJar();
6565

6666
await t.throwsAsync(got({cookieJar}), {
6767
instanceOf: RequestError,
68-
message: 'Cookie has domain set to a public suffix',
68+
message: 'Cookie failed to parse',
6969
});
7070
});
7171

7272
test('does not throw on invalid cookies when options.ignoreInvalidCookies is set', withServer, async (t, server, got) => {
7373
server.get('/', (_request, response) => {
74-
response.setHeader('set-cookie', 'hello=world; domain=localhost');
74+
response.setHeader('set-cookie', 'invalid cookie; domain=localhost');
7575
response.end();
7676
});
7777

0 commit comments

Comments
 (0)
Please sign in to comment.