-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.15.9
Node.js Version
16.14.0
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
After running the tests, the junit xml report files are empty:
What is your expected behavior?
XML files should contain test results
How to reproduce the bug.
Reading the previous bug report #9352, I can see the same result, still empty.
The resolution of #9352 was to use url.fileURLToPath on the following line;
const sameSpecFileName = url.fileURLToPath(specFileName) === suite.file;
What I can see on my side (on Windows, using jamsine framework and typescript), is it compares the 2 following strings:
"D:\Code\***.ts" === "file:///D:/Code/***.ts"
In fact, in my case specFileName and suite.file are both URLs, so doing
const sameSpecFileName = specFileName === suite.file;
or
const sameSpecFileName = url.fileURLToPath(specFileName) === url.fileURLToPath(suite.file);
both work on my case.
So #9352 didn't solve the issue in my environment, but introduced a regression.
May be we should check which type of file name is on both side of the comparison (file path or URL). If both have the same type, we can compare them directly, else we should convert the one being an URL into a path using fileURLToPath ?
Relevant log output
no relevant log outputCode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues