-
-
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
[Proposal] rootHooks
accept import(name)
as input
#4780
Comments
@loynoir we are using karma-mocha in our repo as well and I'm not happy with it, since it hasn't been maintained for one year and a half. Its status is completely outdated. I always feel releived when our CI karma tests have passed successfully. So my enthusiasm to touch Mocha for karma-mocha's sake is limited.
In Mocha the
Btw Mocha's Tbh I don't really understand this PR. I don't see the link between |
Sorry, I just notice mocha hasn't been maintained for one year and a half. I'm very appreciate for your maintainance here. 👍 I'm ok to close this proposal.
// karma.config.js
client: {
mocha: {
timeout: 600000,
// afterAll is a function
rootHooks: {afterAll}
},
} // karma runtime context
// window.__karma__.config.mocha.rootHooks is empty object
> window.__karma__.config.mocha
{ timeout: 600000, rootHooks: {} }
Yes, before this proposal, I already fix that in my karma-mocha fork. Run
I use
Thanks for your suggestion. Anyway, I have got test working, to ensure no At last, appreciate again, for your mocha maintainance 🤗 |
@loynoir thank you 👍 |
I just want to leave a note here that the Karma repos are still being maintained but with limited resources. |
Is your feature request related to a problem or a nice-to-have?? Please describe.
Background: karma & mocha
karma-mocha
is not await for<script type="module">
. WhenXXX.spec.js
have top level await, or slow import, all unit tests within it are silently missing. issuerootHooks
works in mochaI fixed it in pull. Try to add unit test. And mocha can identify if some unit tests are missing.
rootHooks
not works in karmaGot serialize problem.
rootHooks
inmocha.setup(config)
is not serializable.Describe the solution you'd like
Related defination, add here for better reading
Current defination
Proposal
Usage
Serializable configuration
Equals to
Equals to
import()
supported by node and browsers, and can use modules.describe()
in sync context, results inmocha.setup
can't await here.Describe alternatives you've considered
On
karma-mocha
side, using AST tools convertrootHooks
to sync version browser support code, and somehow load all dynamic files into karma, beforemocha.setup
and allkarma
files.Additional context
The text was updated successfully, but these errors were encountered: