Skip to content

Commit

Permalink
fix: add unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
narol1024 committed Jun 2, 2024
1 parent a38cdd8 commit 35153ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platforms/npm-package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void>((_, timeoutReject) => {
countNpmPackageDependantsTimeId = setTimeout(() => timeoutReject(new Error('Operation timed out')), 20000);
countNpmPackageDependantsTimeId = setTimeout(() => timeoutReject(new Error('Operation timed out')), 10000);
});
const fetchPromise = async (): Promise<void> => {
try {
Expand Down

0 comments on commit 35153ef

Please sign in to comment.