Open rohitmishr opened 3 days ago
Are you seeing this error when importing @backstage/backend-test-utils
in a test file? It is only intended to be used in tests, if it's imported in the main build it's expected that it breaks in this way.
when we are trying to run application via yarn dev then I am getting this jest not define.
The thing is we are not able to find mockservice.ts inside backend/node_modules.
when we tried to upgrade backstage version from 1.26 to 1.31 then we are getting this error.
And this is getting from plugin tech-insigths.
I see that the tech-insights backend has a production dependency on backend-test-utils: https://github.com/backstage/community-plugins/blob/fdb08e6fe73cc3c0d2be8e37b059979a5cd2eb0c/workspaces/tech-insights/plugins/tech-insights-backend/package.json#L53
There's also no /testUtils
entry point or similar, so that dependency shouldn't be there and is looking like a bug in the tech insights plugin. Gonna move this over to the community plugins repo for fixing there
Contributions to fix this welcome 👍
🔖 Need
Issue: ReferenceError: jest is not defined
Context: We recently upgraded our Backstage version and created a custom TechInsights plugin. This plugin has a dependency on @backstage/backend-test-utils. When attempting to run yarn dev, we encounter the following error:
Steps Taken:
Error Details:
Request for Help: Could anyone provide guidance on how to resolve this ReferenceError? Specifically, how can we ensure that jest is properly defined and available in the context of mockServices.ts?
🎉 Proposal
Issue: ReferenceError: jest is not defined Context: We recently upgraded our Backstage version and created a custom TechInsights plugin. This plugin has a dependency on @backstage/backend-test-utils. When attempting to run yarn dev, we encounter the following error:
when we checked this repo link for latest @backstage/backend-test-utils but after doing yarn install and yarn dev we are getting jest not define.
〽️ Alternatives
No response
❌ Risks
No response
👀 Have you spent some time to check if this RFC has been raised before?
🏢 Have you read the Code of Conduct?