microsoft / microsoft/vscode-test
TypeError: Cannot read property 'describe' of undefined
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 316
- Forks
- 73
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 3
Description
I have the weirdest problem with this error. I get it from a bare bones "cmd.exe" on my machine and in my github ci on "windows-latest". But if I run the test in VS code using my Extension Tests - lean3 launch configuration it runs fine, and if I run it from a Visual Studio Developer Command prompt it runs fine (but I should totally not need a vs developer prompt to run these tests). The repro is this:
- git clone git@github.com:leanprover/vscode-lean4.git
- npm install
- npx lerna bootstrap
- npm run build
- npm run test
The test begins, it downloads a test version of vscode, vscode launches, but then the mocha.run blows up with this error:
TypeError: Cannot read property 'describe' of undefined
My tests are "ui: tdd" tests which is specified in my index.ts so I'm not sure why it's even looking for describe...
But here's the most ridiculous part. If I run this
Windows+r "c:\windows\system32\cmd.exe"
then type this:
pushd d:\git\leanprover\vscode-lean4
npm run test
Then the tests run fine, no problem with mocha. Even weirder, if I do this:
Windows+r "c:\windows\system32\cmd.exe"
Then type:
d:
cd git\leanprover\vscode-lean4
npm run test
It seems to have something to do with the casing of the "D:" drive letter? If I run "pushd D:\git\leanprover\vscode-lean4" then the test fails...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the listed npm commands from a standard Windows cmd.exe, then compare it with the working VS Code launch configuration in .vscode/launch.json and the test setup in index.ts. Trace the bootstrap around mocha.run and the drive-letter casing difference. Done means npm run test works consistently from cmd.exe, the Developer Command Prompt is unnecessary, and CI passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100