Skip to content
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

TypeError: Cannot read property 'describe' of undefined #134

Open
lovettchris opened this issue Mar 17, 2022 · 1 comment
Open

TypeError: Cannot read property 'describe' of undefined #134

lovettchris opened this issue Mar 17, 2022 · 1 comment

Comments

@lovettchris
Copy link
Member

lovettchris commented Mar 17, 2022

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:

  1. git clone git@github.com:leanprover/vscode-lean4.git
  2. npm install
  3. npx lerna bootstrap
  4. npm run build
  5. 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...

@lovettchris
Copy link
Member Author

Since this may be a mocha bug I filed this:
mochajs/mocha#4851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant