Skip to content

Commit ae5ecd5

Browse files
committed
Add status to tests
1 parent 385b5d3 commit ae5ecd5

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

test/updatetest.js

+14-5
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,23 @@ function assertUpdates(
6565
secondRequest,
6666
secondResponse
6767
) {
68+
firstResponse = withHeaders(firstResponse, { foo: 'original', 'x-other': 'original' });
69+
if (!firstResponse.status) {
70+
firstResponse.status = 200;
71+
}
72+
secondResponse = withHeaders(secondResponse, {
73+
foo: 'updated',
74+
'x-ignore-new': 'ignoreme',
75+
});
76+
if (!secondResponse.status) {
77+
secondResponse.status = 304;
78+
}
79+
6880
const headers = notModifiedResponseHeaders(
6981
firstRequest,
70-
withHeaders(firstResponse, { foo: 'original', 'x-other': 'original' }),
82+
firstResponse,
7183
secondRequest,
72-
withHeaders(secondResponse, {
73-
foo: 'updated',
74-
'x-ignore-new': 'ignoreme',
75-
})
84+
secondResponse
7685
);
7786
assert(headers);
7887
assert.equal(headers['foo'], 'updated');

0 commit comments

Comments
 (0)