Skip to content

Commit af6a3df

Browse files
committed
Fix test when token quota is exceeded
1 parent e6401a9 commit af6a3df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/socket-npm.test.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ for (const npmDir of ['npm9', 'npm10', 'npm11']) {
7373
})
7474
spawnPromise.catch((e: unknown) => {
7575
spawnPromise.process.kill('SIGINT')
76-
if (e?.['stderr'].includes('typosquat')) {
76+
if (
77+
e?.['stderr'].includes('typosquat') ||
78+
// Sometimes our token quota is exceeded.
79+
e?.['stderr'].includes('Too Many Requests')
80+
) {
7781
resolve('OK')
7882
} else {
7983
reject(e)

0 commit comments

Comments
 (0)