admin管理员组文章数量:1291125
I have simple test automation project with TypeScript + Vitest + allure-vitest reporter. I have tried to upgrade/downgrade main dependencies without any luck.
It works perfectly on one type of machine (laptop Windows 11), but failed to run on some virtual Windows machine. Node installation, dependencies are the identical. We even tried to copy whole Node and NPM folders to the virtual machine.
The problem is, that for code like the following:
describe('Hello Suite', async function () {
it.only(`Hello TestCase`, async function () {
await allure.step(`Execute step`, async (step) => {
console.log('Test Step')
})
console.log('Done')
})
})
We are getting
Error: Vitest failed to find the current suite. This is a bug in Vitest. Please, open an issue with reproduction.
❯ VitestTestRuntime.sendMessage ...../node_modules/allure-vitest/src/VitestTestRuntime.ts:13:26
❯ ../../../../Dev/...../node_modules/allure-js-commons/src/sdk/runtime/MessageTestRuntime.ts:166:16
I already checked the GitHub Vitest page, it states, that problem is with compilation of code outside of Vitest. I guess with allure-reporter.
It's true, if we remove allure from test, it runs. I am not sure, how to debug this problem. I even could not find the VitestTestRuntime.ts file to drill in.
local
+-- @types/[email protected]
+-- @types/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
global
-- [email protected]
+-- [email protected]
`-- [email protected]
My questions are:
- How to debug such problem?
- What else can I try?
I have simple test automation project with TypeScript + Vitest + allure-vitest reporter. I have tried to upgrade/downgrade main dependencies without any luck.
It works perfectly on one type of machine (laptop Windows 11), but failed to run on some virtual Windows machine. Node installation, dependencies are the identical. We even tried to copy whole Node and NPM folders to the virtual machine.
The problem is, that for code like the following:
describe('Hello Suite', async function () {
it.only(`Hello TestCase`, async function () {
await allure.step(`Execute step`, async (step) => {
console.log('Test Step')
})
console.log('Done')
})
})
We are getting
Error: Vitest failed to find the current suite. This is a bug in Vitest. Please, open an issue with reproduction.
❯ VitestTestRuntime.sendMessage ...../node_modules/allure-vitest/src/VitestTestRuntime.ts:13:26
❯ ../../../../Dev/...../node_modules/allure-js-commons/src/sdk/runtime/MessageTestRuntime.ts:166:16
I already checked the GitHub Vitest page, it states, that problem is with compilation of code outside of Vitest. I guess with allure-reporter.
It's true, if we remove allure from test, it runs. I am not sure, how to debug this problem. I even could not find the VitestTestRuntime.ts file to drill in.
local
+-- @types/[email protected]
+-- @types/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
global
-- [email protected]
+-- [email protected]
`-- [email protected]
My questions are:
- How to debug such problem?
- What else can I try?
1 Answer
Reset to default 0Try to add @vitest/runner
to the package.json
with the same version as the version of vitest
.
You can also check the globally installed NPM packages in your Vitrual Win environment. Some of them may affect the behaviour.
If nothing helps, I recommend trying to use Yarn PNP (with global cache disabled) instead of NPM—it will help isolate the environment. The official examples anisation has an example of Using Allure Vitest with Yarn PNP.
本文标签: nodejsHow to debug configuration issue with allurevitestreporterStack Overflow
版权声明:本文标题:node.js - How to debug configuration issue with allure-vitestreporter - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741508402a2382458.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论