]> BookStack Code Mirror - bookstack/blobdiff - jest.config.ts
Lexical: Got a range of Editor tests working
[bookstack] / jest.config.ts
index 0243b39cddce0541796a3ac3f9e9d918006a82c2..11a86c672ce2376f0f370a336c7901bce60d1c12 100644 (file)
@@ -93,10 +93,13 @@ const config: Config = {
   //   "node"
   // ],
 
-  modulePaths: ['/home/dan/web/bookstack/'],
+  modulePaths: ['./'],
 
   // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
-  moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
+  moduleNameMapper: {
+    'lexical/shared/invariant': 'resources/js/wysiwyg/lexical/core/shared/__mocks__/invariant',
+    ...pathsToModuleNameMapper(compilerOptions.paths),
+  },
 
   // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
   // modulePathIgnorePatterns: [],