-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug test throws Error: No test suite found in file if project is located on D: drive #548
Comments
What version of Vitest are you using? |
|
I reverted to |
Starts failing at 2.1.4 |
Same as what Skrypt is experiencing. Debugging in: VS Code Vitest extension 1.10.2 Personally I had no need to update to vitest 3 for other reasons, so I simply reverted. But this might become a problem in the future. |
Same issue with vitest 3. one thing i noticed is that if i dont import
it shows the test cases correctly. but if i import it, i get the following error in output EDIT: NVM the error log I had was unrelated. EDIT 2: I managed to run the repo and updating vitest version to v3 makes it reproducible. Main issues comes from Line 79 in a466c6b
Addin the following fixes the issue: if (callee.type === 'SequenceExpression') {
const memberExpression = callee.expressions.find((e) => e.type === 'MemberExpression')
if (!memberExpression) {
return null
}
return getName(memberExpression)
} But I dont have enough knowledge in ASTs to know how safe this is |
Correcting myself on previous comment: the problem seems to only happen if youre using vite 6 code sent to AST using vite 6: const __vite_ssr_import_0__ = await __vite_ssr_import__("/node_modules/vitest/dist/index.js", {"importedNames":["describe","it"]});
(0,__vite_ssr_import_0__.describe)("should included", () => {
(0,__vite_ssr_import_0__.it)("is included because of workspace plugin setting", () => {
});
});
//# sourceMappingSource=vite-node
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IkFBQUE7R0FFQSxnQ0FBUyxtQkFBbUIsTUFBTTtBQUNoQywrQkFBRyxtREFBbUQsTUFBTTtBQUFBLEVBQUMsQ0FBQztBQUNoRSxDQUFDIiwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlcyI6WyJzaG91bGRfaW5jbHVkZWRfdGVzdC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBkZXNjcmliZSwgaXQgfSBmcm9tICd2aXRlc3QnXG5cbmRlc2NyaWJlKCdzaG91bGQgaW5jbHVkZWQnLCAoKSA9PiB7XG4gIGl0KCdpcyBpbmNsdWRlZCBiZWNhdXNlIG9mIHdvcmtzcGFjZSBwbHVnaW4gc2V0dGluZycsICgpID0+IHt9KVxufSlcbiJdLCJmaWxlIjoiL1VzZXJzL2x1Y2FzY29ycmVpYS9Eb2N1bWVudHMvd29ya3NwYWNlL2NoaWxpcGlwZXIvdnNjb2RlL3NhbXBsZXMvYmFzaWMvc3JjL3Nob3VsZF9pbmNsdWRlZF90ZXN0LnRzIn0= while in v5: const __vite_ssr_import_0__ = await __vite_ssr_import__("/node_modules/vitest/dist/index.js", {"importedNames":["describe","it"]});
__vite_ssr_import_0__.describe("should included", () => {
__vite_ssr_import_0__.it("is included because of workspace plugin setting", () => {
});
});
//# sourceMappingSource=vite-node
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IkFBQUEsQ0FBQTtBQUE2QjtBQUU3QiwrQkFBUyxtQkFBbUIsTUFBTTtBQUNoQywyQkFBRyxtREFBbUQsTUFBTTtBQUFBLEVBQUMsQ0FBQztBQUNoRSxDQUFDIiwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlcyI6WyJzaG91bGRfaW5jbHVkZWRfdGVzdC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBkZXNjcmliZSwgaXQgfSBmcm9tICd2aXRlc3QnXG5cbmRlc2NyaWJlKCdzaG91bGQgaW5jbHVkZWQnLCAoKSA9PiB7XG4gIGl0KCdpcyBpbmNsdWRlZCBiZWNhdXNlIG9mIHdvcmtzcGFjZSBwbHVnaW4gc2V0dGluZycsICgpID0+IHt9KVxufSlcbiJdLCJmaWxlIjoiL1VzZXJzL2x1Y2FzY29ycmVpYS9Eb2N1bWVudHMvd29ya3NwYWNlL2NoaWxpcGlwZXIvdnNjb2RlL3NhbXBsZXMvYmFzaWMvc3JjL3Nob3VsZF9pbmNsdWRlZF90ZXN0LnRzIn0= Looks like |
Describe the bug
Description
Debug test
in vscode vitest extension fails withError: No test suite found in file D:/gitea/armbzk/vitest-update/tests/dummy.test.mjs
Debug test
-Run test
succeeds without any errorC:
driveDebug test
works finenpx vitest run
in console succeeds (also onD:
drive)Environment
Reproduction
Link to gihub repo: https://github.com/armbzk/vitest-error
tests/dummy.test.mjs:
vitest.config.mts:
package.json:
Output
Version
v1.8.1
Validations
The text was updated successfully, but these errors were encountered: