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

mocha-sidebar empty upon startup #18

Closed
ThatBrianDude opened this issue Nov 7, 2017 · 4 comments
Closed

mocha-sidebar empty upon startup #18

ThatBrianDude opened this issue Nov 7, 2017 · 4 comments

Comments

@ThatBrianDude
Copy link

Sometimes (not always) when I open vscode absolutely no tests show up in the sidebar. Clicking the refresh button does not help either.

After restarting vscode they show up again.

@ThatBrianDude ThatBrianDude changed the title Doenst find any tests. mocha-sidebar empty upon startup Nov 7, 2017
@maty21
Copy link
Owner

maty21 commented Nov 7, 2017

ok tks ill check it

@ThatBrianDude
Copy link
Author

Actually the exact situation was this:

I had to update nodejs as the code that was being tested didnt allow for async operations.
After updating, the code was able to run without failures (previously I got the "unexpected token function" error due to having node 6 installed).
Only then did mocha-sidebar fail to refresh the test suites. Not exactly sure what was going on but thats when the refresh didnt work. But honestly I dont even know if the tests were even running or not.
I will be sure to post any update if I come across this again.

@rosesonfire
Copy link

I am using node v8.5.0. I have the same problem. The following workaround works for me.

How to reproduce:

  1. Close all open files in VScode.
  2. Exit VScode
  3. Re-open VScode. At this point the tests should be loaded into the Mocha Sidebar, but they are not. Refreshing the Mocha Sidebar doesn't load them either.

Work-around:

  1. Open a file in VScode (any file in your project)
  2. Exit VScode
  3. Re-open VScode. The tests are loaded into the Mocha Sidebar. So apparently you have to have some file(s) already open in VScode, when VScode starts.

@maty21
Copy link
Owner

maty21 commented Nov 8, 2017

Ok I'll check it @rosesonfire tks for your contribution :)

@yehiyam yehiyam closed this as completed in 3cab1a8 Nov 8, 2017
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

3 participants