fix(test): restore lint and jest coverage

This commit is contained in:
xixu-me committed 2026-03-30 22:16:00 +08:00
1 parent 712e75891a
commit e58b8273c2
26 files changed
+265 -398

No files matched your search

+3 -3
View File
@@ -29,9 +29,9 @@ const ACCEPT_LANGUAGES = [
* Get available proxy endpoints from environment configuration
* Parses and validates proxy URLs from environment variables
* @param env Environment bindings containing proxy configuration
* @returns Promise<ProxyEndpoint[]> - Array of available proxy endpoints
* @returns ProxyEndpoint[] - Array of available proxy endpoints
*/
export async function getProxyEndpoints(env: Env): Promise<ProxyEndpoint[]> {
export function getProxyEndpoints(env: Env): ProxyEndpoint[] {
// Get proxy URLs from environment variables
const proxyUrls = env.PROXY_URLS
? env.PROXY_URLS.split(",").map((url) => url.trim())
@@ -51,7 +51,7 @@ export async function getProxyEndpoints(env: Env): Promise<ProxyEndpoint[]> {
*/
export async function selectProxy(env: Env): Promise<ProxyEndpoint | null> {
try {
const proxies = await getProxyEndpoints(env);
const proxies = getProxyEndpoints(env);
if (proxies.length === 0) {
return null;