From 35153effde6c8412748029c71ad3e49714dd0ece Mon Sep 17 00:00:00 2001 From: narol Date: Sun, 2 Jun 2024 13:10:51 +0800 Subject: [PATCH] fix: add unit testing --- src/platforms/npm-package/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/npm-package/index.ts b/src/platforms/npm-package/index.ts index c96e4ee..2831502 100644 --- a/src/platforms/npm-package/index.ts +++ b/src/platforms/npm-package/index.ts @@ -61,7 +61,7 @@ export async function countNpmPackageDependants(packageName: string, version: st const path = version !== null ? `${packageName}/v/${version}` : packageName; const url = `https://www.npmjs.com/package/${path}?activeTab=dependents&t=${Date.now()}`; const timeoutPromise = new Promise((_, timeoutReject) => { - countNpmPackageDependantsTimeId = setTimeout(() => timeoutReject(new Error('Operation timed out')), 20000); + countNpmPackageDependantsTimeId = setTimeout(() => timeoutReject(new Error('Operation timed out')), 10000); }); const fetchPromise = async (): Promise => { try {