Skip to content

Commit 14e6a8f

Browse files
authored
test: compare with specific errors (#2693)
1 parent fee245c commit 14e6a8f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/cookie/cookies.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test('Cookie Name Validation', () => {
8282
maxAge: 3
8383
})
8484
},
85-
Error
85+
new Error('Invalid cookie name')
8686
)
8787
})
8888
})
@@ -116,7 +116,7 @@ test('Cookie Value Validation', () => {
116116
}
117117
)
118118
},
119-
Error,
119+
new Error('Invalid header value'),
120120
"RFC2616 cookie 'Space'"
121121
)
122122
})
@@ -128,7 +128,7 @@ test('Cookie Value Validation', () => {
128128
value: 'United Kingdom'
129129
})
130130
},
131-
Error,
131+
new Error('Invalid header value'),
132132
"RFC2616 cookie 'location' cannot contain character ' '"
133133
)
134134
})
@@ -147,7 +147,7 @@ test('Cookie Path Validation', () => {
147147
maxAge: 3
148148
})
149149
},
150-
Error,
150+
new Error('Invalid cookie path'),
151151
path + ": Invalid cookie path char ';'"
152152
)
153153
})
@@ -167,7 +167,7 @@ test('Cookie Domain Validation', () => {
167167
maxAge: 3
168168
})
169169
},
170-
Error,
170+
new Error('Invalid cookie domain'),
171171
'Invalid first/last char in cookie domain: ' + domain
172172
)
173173
})

0 commit comments

Comments
 (0)