From 72c8f3b61e8f7fd7d2388a2af0c6e7cfba6a75dc Mon Sep 17 00:00:00 2001 From: Richard Lundeen Date: Wed, 11 Nov 2026 23:57:40 -0800 Subject: [PATCH] TEST: Stop transforming Fluent UI in Jest Fluent UI ships CommonJS, but the transform allowlist sent every @fluentui file through ts-jest and the Jest transform cache. Each suite that renders Fluent touched about 4,000 cache entries. On Windows, parallel Jest runs that fill the same cache can hit EPERM reading an entry another process is replacing, and Jest reports that as "Test suite failed to run". Leave @fluentui to plain require. Per-suite load time drops and the Fluent cache entries, with their race, go away. Co-Authored-By: Claude Opus 5.5 --- frontend/jest.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/jest.config.ts b/frontend/jest.config.ts index 13ffe01bcc..d8c38d99ae 100644 --- a/frontend/jest.config.ts +++ b/frontend/jest.config.ts @@ -54,8 +54,11 @@ const config: Config = { // remark/micromark/unified/mdast/hast/unist dependencies are ESM-only, as are // react-router and its cookie-es and @remix-run/route-pattern dependencies. // They must be transformed; everything else in node_modules stays ignored. + // Keep @fluentui out of this list: it ships CommonJS (lib-commonjs), and + // transforming it sends thousands of files per suite through the transform + // cache, which is slow and races into EPERM reads on Windows under parallel runs. transformIgnorePatterns: [ - "/node_modules/(?!(@fluentui|axios|react-markdown|react-router|@remix-run/route-pattern|cookie-es|remark-.*|rehype-.*|micromark.*|mdast-.*|hast-.*|unist-.*|unified|bail|trough|vfile.*|is-plain-obj|trim-lines|property-information|comma-separated-tokens|space-separated-tokens|decode-named-character-reference|character-entities.*|html-url-attributes|devlop|zwitch|longest-streak|markdown-table|ccount|escape-string-regexp|estree-util-.*|hastscript|web-namespaces|stringify-entities|inline-style-parser|style-to-object)/)", + "/node_modules/(?!(axios|react-markdown|react-router|@remix-run/route-pattern|cookie-es|remark-.*|rehype-.*|micromark.*|mdast-.*|hast-.*|unist-.*|unified|bail|trough|vfile.*|is-plain-obj|trim-lines|property-information|comma-separated-tokens|space-separated-tokens|decode-named-character-reference|character-entities.*|html-url-attributes|devlop|zwitch|longest-streak|markdown-table|ccount|escape-string-regexp|estree-util-.*|hastscript|web-namespaces|stringify-entities|inline-style-parser|style-to-object)/)", ], globals: {}, };