docs: fixes and improvements to testing docs (#11244)
* docs: fixes and improvements to testing docs * generate files
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
export const metadata = {
|
||||
title: `Test Errors`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
## Loaders for module Workflows failed
|
||||
|
||||
If you get the following error when running your tests:
|
||||
|
||||
```bash
|
||||
Loaders for module Workflows failed: Method Map.prototype.set called on incompatible receiver #<Map>
|
||||
```
|
||||
|
||||
This may occur if you have multiple test files and you don't configure your Jest environment correctly. To resolve this, add the following configuration to your `jest.config.js` file:
|
||||
|
||||
```js title="jest.config.js"
|
||||
module.exports = {
|
||||
// ...
|
||||
setupFiles: ["./integration-tests/setup.js"],
|
||||
}
|
||||
```
|
||||
|
||||
Then, create the `integration-tests/setup.js` file with the following content:
|
||||
|
||||
```js title="integration-tests/setup.js"
|
||||
const { MetadataStorage } = require("@mikro-orm/core")
|
||||
|
||||
MetadataStorage.clear()
|
||||
```
|
||||
|
||||
Learn more about configuring test tools in [this documentation](!docs!/learn/debugging-and-testing/testing-tools)
|
||||
@@ -5901,5 +5901,6 @@ export const generatedEditDates = {
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.StoreProductTypeParams/page.mdx": "2025-01-27T11:43:54.211Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.StoreProductTypeResponse/page.mdx": "2025-01-27T11:43:54.212Z",
|
||||
"references/types/interfaces/types.BaseProductTypeListParams/page.mdx": "2025-01-27T11:43:54.550Z",
|
||||
"references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderChangesStepId/page.mdx": "2025-01-27T11:43:49.278Z"
|
||||
"references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderChangesStepId/page.mdx": "2025-01-27T11:43:49.278Z",
|
||||
"app/troubleshooting/test-errors/page.mdx": "2025-01-31T13:08:42.639Z"
|
||||
}
|
||||
@@ -1235,6 +1235,10 @@ export const filesMap = [
|
||||
"filePath": "/www/apps/resources/app/troubleshooting/s3/page.mdx",
|
||||
"pathname": "/troubleshooting/s3"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/app/troubleshooting/test-errors/page.mdx",
|
||||
"pathname": "/troubleshooting/test-errors"
|
||||
},
|
||||
{
|
||||
"filePath": "/www/apps/resources/app/troubleshooting/workflow-errors/page.mdx",
|
||||
"pathname": "/troubleshooting/workflow-errors"
|
||||
|
||||
@@ -17293,6 +17293,14 @@ export const generatedSidebar = [
|
||||
"path": "/troubleshooting/workflow-errors",
|
||||
"title": "Workflow Errors",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"loaded": true,
|
||||
"isPathHref": true,
|
||||
"type": "link",
|
||||
"path": "/troubleshooting/test-errors",
|
||||
"title": "Test Errors",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -45,6 +45,11 @@ export const troubleshootingSidebar = [
|
||||
path: "/troubleshooting/workflow-errors",
|
||||
title: "Workflow Errors",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
path: "/troubleshooting/test-errors",
|
||||
title: "Test Errors",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user