fix: properly bubble up cookie creation failure message (#37586)
This commit is contained in:
parent
48d0b09ad9
commit
b8f970c1c7
3 changed files with 22 additions and 7 deletions
|
@ -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 () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue