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

Bug with using underscores in folder names #640

Closed
vuk opened this issue Jun 6, 2016 · 0 comments
Closed

Bug with using underscores in folder names #640

vuk opened this issue Jun 6, 2016 · 0 comments

Comments

@vuk
Copy link

vuk commented Jun 6, 2016

I'm using Mocha with Istanbul and I have a module loaded globally to Mocha with --require test/common
In package.json I have posttest script that runs Istanbul to generate coverage report.

istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive

Now, I tried to organize my tests to follow my app folder structure. So i have something like this

-- app
------ __lib__
------ another folder

So this structure should be followed in test folder also.
But when I add files to lib folder I get an error about global.my_helper that I've loaded from common module saying Object #<Object> has no method 'my_helper'.

When I rename __lib__ to lib everything goes as expected.

Also Mocha passes all tests even with __lib__, but Istanbul crashes and doesn't generate coverage report

@vuk vuk closed this as completed Nov 17, 2018
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