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

Gulp file cannot be parsed when mocha is used (and a temporary workaround) #5

Closed
akfish opened this issue Dec 19, 2015 · 0 comments · Fixed by #6
Closed

Gulp file cannot be parsed when mocha is used (and a temporary workaround) #5

akfish opened this issue Dec 19, 2015 · 0 comments · Fixed by #6

Comments

@akfish
Copy link
Contributor

akfish commented Dec 19, 2015

This is a wired bug. Whenever mocha is used in the gulp file, it will not be parsed correctly thus the tasks cannot be listed.
Basically it's because atom's Task environment has document object but no location. This confuses mocha (See also mochajs/mocha#1654)

A temporary workaround is to expose a fake location object to global in your gulpfile:

GLOBAL.location =
  href: process.cwd() + "/"

A pretty corner case here, so not sure when and who will decide to fix it in which project. Just documented it here in case some one has the same problem.

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

Successfully merging a pull request may close this issue.

1 participant