mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
test(node/url): add more node:test parallel cases (#16404)
This commit is contained in:
@@ -567,6 +567,32 @@ JSC::EncodedJSValue INVALID_ARG_VALUE(JSC::ThrowScope& throwScope, JSC::JSGlobal
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue INVALID_URL_SCHEME(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::String& expectedScheme)
|
||||
{
|
||||
auto message = makeString("The URL must be of scheme "_s, expectedScheme);
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_INVALID_URL_SCHEME, message));
|
||||
return {};
|
||||
}
|
||||
JSC::EncodedJSValue INVALID_FILE_URL_HOST(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::String& platform)
|
||||
{
|
||||
auto message = makeString("File URL host must be \"localhost\" or empty on "_s, platform);
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_INVALID_FILE_URL_HOST, message));
|
||||
return {};
|
||||
}
|
||||
JSC::EncodedJSValue INVALID_FILE_URL_HOST(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const ASCIILiteral platform)
|
||||
{
|
||||
auto message = makeString("File URL host must be \"localhost\" or empty on "_s, platform);
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_INVALID_FILE_URL_HOST, message));
|
||||
return {};
|
||||
}
|
||||
/// `File URL path {suffix}`
|
||||
JSC::EncodedJSValue INVALID_FILE_URL_PATH(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const ASCIILiteral suffix)
|
||||
{
|
||||
auto message = makeString("File URL path "_s, suffix);
|
||||
throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_INVALID_FILE_URL_PATH, message));
|
||||
return {};
|
||||
}
|
||||
|
||||
JSC::EncodedJSValue UNKNOWN_ENCODING(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::StringView encoding)
|
||||
{
|
||||
auto message = makeString("Unknown encoding: "_s, encoding);
|
||||
@@ -655,7 +681,7 @@ JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_CURVE(JSC::ThrowScope& throwScope, JS
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace ERR
|
||||
|
||||
static JSC::JSValue ERR_INVALID_ARG_TYPE(JSC::ThrowScope& scope, JSC::JSGlobalObject* globalObject, JSValue arg0, JSValue arg1, JSValue arg2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user