MCPcopy
hub / github.com/jestjs/jest / retry

Method retry

packages/jest-haste-map/src/index.ts:778–798  ·  view source on GitHub ↗
(retryError: Error)

Source from the content-addressed store, hash-verified

776 };
777
778 const retry = (retryError: Error) => {
779 if (crawl === watchmanCrawl) {
780 this._console.warn(
781 'jest-haste-map: Watchman crawl failed. Retrying once with node ' +
782 'crawler.\n' +
783 " Usually this happens when watchman isn't running. Create an " +
784 "empty `.watchmanconfig` file in your project's root folder or " +
785 'initialize a git or hg repository in your project.\n' +
786 ` ${retryError}`,
787 );
788 return nodeCrawl(crawlerOptions).catch(error => {
789 throw new Error(
790 'Crawler retry failed:\n' +
791 ` Original error: ${retryError.message}\n` +
792 ` Retry error: ${error.message}\n`,
793 );
794 });
795 }
796
797 throw retryError;
798 };
799
800 try {
801 return await crawl(crawlerOptions);

Callers

nothing calls this directly

Calls 3

nodeCrawlFunction · 0.90
catchMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected