Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
ofir committed Jan 30, 2022
commit cc0395503d90aa6ff0f84b73f3220f99787555e2
12 changes: 6 additions & 6 deletions test/parallel/test-http2-multiheaders-raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ src.test = 'foo, bar, baz';

server.on('stream', common.mustCall((stream, headers, flags, rawHeaders) => {
const expected = [
':path',
'/',
':scheme',
'http',
':authority',
`localhost:${server.address().port}`,
':method',
'GET',
':authority',
`localhost:${server.address().port}`,
':scheme',
'http',
':path',
'/',
'www-authenticate',
'foo',
'www-authenticate',
Expand Down
14 changes: 7 additions & 7 deletions test/parallel/test-http2-util-headers-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const {
{
const headers = {
'abc': 1,
':status': 200,
':path': 'abc',
':status': 200,
'xyz': [1, '2', { toString() { return '3'; } }, 4],
'foo': [],
'BAR': [1]
Expand All @@ -116,8 +116,8 @@ const {
{
const headers = {
'abc': 1,
':path': 'abc',
':status': [200],
':path': 'abc',
':authority': [],
'xyz': [1, 2, 3, 4]
};
Expand All @@ -132,10 +132,10 @@ const {
{
const headers = {
'abc': 1,
':path': 'abc',
':status': 200,
'xyz': [1, 2, 3, 4],
'': 1,
':status': 200,
':path': 'abc',
[Symbol('test')]: 1 // Symbol keys are ignored
};

Expand All @@ -150,10 +150,10 @@ const {
// Only own properties are used
const base = { 'abc': 1 };
const headers = Object.create(base);
headers[':path'] = 'abc';
headers[':status'] = 200;
headers.xyz = [1, 2, 3, 4];
headers.foo = [];
headers[':status'] = 200;
headers[':path'] = 'abc';

assert.deepStrictEqual(
mapToHeaders(headers),
Expand Down Expand Up @@ -191,8 +191,8 @@ const {
{
const headers = {
'abc': 1,
':path': 'abc',
':status': [200],
':path': 'abc',
':authority': [],
'xyz': [1, 2, 3, 4],
[sensitiveHeaders]: ['xyz']
Expand Down