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,46 @@
'use strict';
require('../common');
const { URLPattern } = require('url');
const { throws } = require('assert');
// Verifies that calling URLPattern with no new keyword throws.
throws(() => URLPattern(), {
code: 'ERR_CONSTRUCT_CALL_REQUIRED',
});
// Verifies that type checks are performed on the arguments.
throws(() => new URLPattern(1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => new URLPattern({}, 1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => new URLPattern({}, '', 1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => new URLPattern({}, { ignoreCase: '' }), {
code: 'ERR_INVALID_ARG_TYPE',
});
const pattern = new URLPattern();
throws(() => pattern.exec(1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => pattern.exec('', 1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => pattern.test(1), {
code: 'ERR_INVALID_ARG_TYPE',
});
throws(() => pattern.test('', 1), {
code: 'ERR_INVALID_ARG_TYPE',
});