fix(http): Headers.append should append to the list
This commit is contained in:

committed by
Tobias Bosch

parent
d9d57d71dd
commit
a67c06708d
@ -111,6 +111,14 @@ export function main() {
|
||||
});
|
||||
|
||||
describe('.append', () => {
|
||||
it('should append a value to the list', () => {
|
||||
const headers = new Headers();
|
||||
headers.append('foo', 'bar');
|
||||
headers.append('foo', 'baz');
|
||||
expect(headers.get('foo')).toEqual('bar');
|
||||
expect(headers.getAll('foo')).toEqual(['bar', 'baz']);
|
||||
});
|
||||
|
||||
it('should preserve the case of the first call', () => {
|
||||
const headers = new Headers();
|
||||
|
||||
|
Reference in New Issue
Block a user