Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,24 @@
// Flags: --expose-internals
'use strict';
require('../common');
const assert = require('assert');
// Tests the assertValidPseudoHeader function that is used within the
// buildNgHeaderString function. The assert function is not exported so we
// have to test it through buildNgHeaderString
const { buildNgHeaderString } = require('internal/http2/util');
// These should not throw
buildNgHeaderString({ ':status': 'a' });
buildNgHeaderString({ ':path': 'a' });
buildNgHeaderString({ ':authority': 'a' });
buildNgHeaderString({ ':scheme': 'a' });
buildNgHeaderString({ ':method': 'a' });
assert.throws(() => buildNgHeaderString({ ':foo': 'a' }), {
code: 'ERR_HTTP2_INVALID_PSEUDOHEADER',
name: 'TypeError',
message: '":foo" is an invalid pseudoheader or is used incorrectly'
});