fix: properly bubble up cookie creation failure message (#37586)

This commit is contained in:
Shelley Vohr 2023-03-16 13:48:14 +01:00 committed by GitHub
parent 48d0b09ad9
commit b8f970c1c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 7 deletions

View file

@ -128,7 +128,7 @@ describe('session module', () => {
await expect(
cookies.set({ url: '', name, value })
).to.eventually.be.rejectedWith('Failed to get cookie domain');
).to.eventually.be.rejectedWith('Failed to set cookie with an invalid domain attribute');
});
it('yields an error when setting a cookie with an invalid URL', async () => {
@ -138,7 +138,7 @@ describe('session module', () => {
await expect(
cookies.set({ url: 'asdf', name, value })
).to.eventually.be.rejectedWith('Failed to get cookie domain');
).to.eventually.be.rejectedWith('Failed to set cookie with an invalid domain attribute');
});
it('should overwrite previous cookies', async () => {