-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support for --file option #222
Comments
Sure, why not. I guess the only important thing to notice is that this |
@1999 Maybe this won't work for what I'm trying to achieve. I'm trying to have a 1 time 'before' that runs before all test executions and then a 1 time 'after' that runs after all test executions are complete. This works with the '--file' option in mocha but when I try this with mocha-parallel-tests it throws this "error: unknown option `--test'". Is this 1 time before/after possible with mocha-parallel-tests? |
Not really unfortunately |
Do you have some guidelines or how to for contributors? |
Probably not. The project right now is not that complicated. Linting is preconfigured and editorconfig should help you start writing the code. For all pull requests, it's great to add some test - they are in "test" directory. Other than that, feel free to reach me out and ask for help. |
The --file option would be a nice adding, I have an issue to load global async hooks. |
+1 |
Really need this. In our old frontend we're still using Mocha (in new frontends we moved to Jest) and running tests there can take quite a bit of time. Running them in parallel would be a great thing but alas, we need a file setup for the tests to actually run as it requires some libraries to have been spun up that cannot be included with I'm open to making the PR for this but I'm not exactly sure what the flow is after looking through the code, that said I'll give it a shot and see where I get. |
@favna that's the spirit :) The flow is pretty easy - you create a PR which contains a test, we review it together and merge. The tests are in "test" folder, see delay option support test for example. |
@1999 I gave it a shot but I can't quite figure out tests. Maybe you could have a look? Here is the compare of the changes I've made so far: master...Favna:feat/file_option, based on this branch: https://github.com/Favna/mocha-parallel-tests/tree/feat/file_option. For some reason adding this code also has many other tests fail, but some pre-existing tests are already failing on a clean version of master. Not sure if that's just because I'm on Windows? Do you guys use a Unix system to develop? Edit: as per partial example this is what I mean with tests on master failing on windows: https://hasteb.in/roriheyi.yaml |
That's the reason: mocha-parallel-tests doesn't work well on Windows: #254. If you can use Linux/Mac to run your tests that would be easier for now. Also, could you please raise a PR so we can continue the convo there? |
Took quite my time but I've been busy. Just fixed the tests using my Macbook and created PR #267 |
fixes mocha-parallel#222 Signed-off-by: Jeroen Claassens <[email protected]>
Any progress on this? ;D |
Pretty much only my PR #267 @DanMossa. I haven't really made time to look into why tests are flaky and I haven't been much motivated either since I have a strong preference for the Jest framework myself these days. My only interest in Mocha at the time lay in a single legacy app we still had at work but we've pretty much deprecated that app now as well. |
fixes #222 Signed-off-by: Jeroen Claassens <[email protected]>
Is it possible to add support for the mocha '--file' option that would help in executing root level hooks?
The text was updated successfully, but these errors were encountered: