Re-enable cookie specs and add custom cookie name/url validation

This commit is contained in:
Samuel Attard 2018-06-18 14:34:26 +10:00
parent c4f80a6d89
commit 8200a132be
2 changed files with 11 additions and 3 deletions

View file

@ -90,13 +90,13 @@ describe('session module', () => {
})
})
// TODO(alexeykuzmin): [Ch66] Fails. Fix it and enable back.
xit('calls back with an error when setting a cookie with missing required fields', (done) => {
it('calls back with an error when setting a cookie with missing required fields', (done) => {
session.defaultSession.cookies.set({
url: '',
name: '1',
value: '1'
}, (error) => {
assert(error, 'Should have an error')
assert.equal(error.message, 'Setting cookie failed')
done()
})