-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Require 'flag' for JS api #430
Comments
+1, I'm growing tired of including Chai, Sinon, and declaring expect at the top of each test case. Alternatively, there should be a way to define global objects for the testcases (like the 'describe' and 'it' functions) |
Nevermind, I found a way: attach Chai and Sinon, or anything you want a global to the 'global' object. This works in both Node.js and the browser. |
Unfortunately not an option for me. Anyways I'd think, that it would add a lot of dynamism to the framework. |
just would like to second this as a nice to have |
no reason to introduce tons of globals really, a few first-class mocha globals are ok but why have tons of them? It's much clearer where things came from, that's one of the best things about node (and commonjs). Buy anyway, to answer the question you can use |
+1 for me too - someone just raised an issue against my grunt-mocha-test task for not supporting this. I will look into the use of |
Closing as |
As far as I know there's no way to add files to require for suites using JS API. If there is, please educate me.
I would really like to help with that but it feels a bit too complex for me to get my hands dirty. If here's anyone who could explain me how it is working for cli, I would appriciate it.
require()
seems to be modded to able it to usage so the exports of a module would go global. Like here:Any comments are welcome.
The text was updated successfully, but these errors were encountered: