fix: name and expirationDate should be optional when setting cookie (#21454)

* fix: correctly set cookie date

* fix: name is not required for setting cookie

* test: clear cookie after each cookie test

* test: should test session property

* chore: style fixes
This commit is contained in:
Cheng Zhao 2019-12-11 16:44:49 +09:00 committed by GitHub
parent cbe1e3a1d0
commit d5192853f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 29 deletions

View file

@ -591,7 +591,8 @@ describe('net module', () => {
customSession.cookies.set({
url: `${serverUrl}`,
name: 'test',
value: '11111'
value: '11111',
expirationDate: 0
}).then(() => { // resolved
const urlRequest = net.request({
method: 'GET',