|
@@ -145,6 +145,16 @@ describe('session module', () => {
|
|
|
expect(error).to.have.property('message').which.equals('Failed to get cookie domain')
|
|
|
})
|
|
|
|
|
|
+ it('yields an error when setting a cookie with an invalid URL', async () => {
|
|
|
+ const { cookies } = session.defaultSession
|
|
|
+ const name = '1'
|
|
|
+ const value = '1'
|
|
|
+
|
|
|
+ await expect(
|
|
|
+ cookies.set({ url: 'asdf', name, value })
|
|
|
+ ).to.eventually.be.rejectedWith('Failed to get cookie domain')
|
|
|
+ })
|
|
|
+
|
|
|
it('should overwrite previous cookies', async () => {
|
|
|
let error
|
|
|
try {
|