hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

Explorer UI lists spec files using absolute paths which are unreadable. #40

Closed Neutrino-Sunset closed 4 years ago

Neutrino-Sunset commented 4 years ago

The Explorer UI is listing the spec files in my workspace using the absolute path, which when the VsCode sidebar is a normal size means the filename isn't even visible and the Explorer UI just displays a list of paths where each path is the beginning of the path to my workspace.

The same workspace on a different machine shows some of test suite paths as absolute, and some as relative.

TestUi Files Normal

Enabling the logging and clicking 'Reload Tests' generated the following log jte.log

Neutrino-Sunset commented 4 years ago

I've identified the problem.

I was using a forward slash '/' to separate the describe('test suite /', ...) test suite name from the it('test', ...) test name. This seems to have broken the test explorer UI's ability to idenitify the relative path of the test suite.

Unless it's a simple fix it's probably not worth bothering with since having identified the problem I'm just using a different separator character instead, and in the unlikely event that someone else has the same issue then with a little effort they'll find this bug report - and the solution.