File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ // Mock implementation of p-limit for Jest tests
2+ // p-limit is a utility for limiting the number of concurrent promises
3+
4+ const pLimit = ( concurrency ) => {
5+ // Return a function that just executes the passed function immediately
6+ // In tests, we don't need actual concurrency limiting
7+ return ( fn ) => {
8+ if ( typeof fn === "function" ) {
9+ return fn ( )
10+ }
11+ return fn
12+ }
13+ }
14+
15+ // Set default export
16+ pLimit . default = pLimit
17+
18+ module . exports = pLimit
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ export default {
3232 "@modelcontextprotocol/sdk/(.*)" : "<rootDir>/__mocks__/@modelcontextprotocol/sdk/$1" ,
3333 "^delay$" : "<rootDir>/__mocks__/delay.js" ,
3434 "^p-wait-for$" : "<rootDir>/__mocks__/p-wait-for.js" ,
35+ "^p-limit$" : "<rootDir>/__mocks__/p-limit.js" ,
3536 "^serialize-error$" : "<rootDir>/__mocks__/serialize-error.js" ,
3637 "^strip-ansi$" : "<rootDir>/__mocks__/strip-ansi.js" ,
3738 "^default-shell$" : "<rootDir>/__mocks__/default-shell.js" ,
You can’t perform that action at this time.
0 commit comments