-
-
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
🚀 Feature: --ui require
for require interface
#2210
Comments
...yes 😄. If anybody has a really compelling use case for continuing to |
--ui require
for require interface--ui require
for require interface
I’m not sure if there is a misunderstanding here. If I understand the request correctly it is about the Right now it is not possible to define the Related: |
We're talking about https://mochajs.org/#require, right? If so: #956 would be the right tracking feature there. "require" as a term is what we're trying to avoid. A name like "import" or "esm" (just ideating) would be more forward-facing. But, also note #5027: we're intentionally trying to change too many big things with Mocha. |
Yes, exactly.
Alright, I will add a comment there suggesting this feature as one way to opt-out of globals. |
Awesome thanks! FWIW I think I'm pretty in agreement with you, that having some equivalent to |
There seems to be quite a bit of discussion about how to handle globals in future versions of Mocha, e.g. #1969. It seems like that stuff is going to be slow to hash out. In the meantime I'd like to suggest that you consider making it possible to do
mocha --ui require
to signal that you want the require interface -- meaning that you don't want globals defined. To me the current system is a half measure -- if you want to avoid using globals what you really want is to avoid them being defined at all to eliminate pollution of the global namespace and a source of potential bugs. To me it's very odd that "using" the require interface still requires using one of the other interfaces, which by default isbdd
which defines globals.The text was updated successfully, but these errors were encountered: