-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 requests for jest-circus #4371
Comments
@cpojer @aaronabramov As part of the second bullet, we could pull the module-level state in jest-circus/src/state.js into an object. So instead of the module exporting |
oh.. i posted the my reply yesterday, but it seems like there was a network error and it eventually didn't get posted :( @ide i think all three features are possible to have with |
@aaronabramov oh man, that sucks when your post gets lost like that, sorry :( @suchipi's suggestion would work for me, right now I'm mutating the global Jest state. It'd also be nice (when the time comes) to know what parts of the state are considered the public API (ex: which events are public, which state fields are public) and what parts are implementation details that are more likely to change. |
Bumping this based on the new circus work we're doing |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm looking into running Jest in RN and with the beta version of jest-circus. I had a couple of questions and feature requests for jest-circus I was hoping to share as the team works on it.
Starting with some questions: what is the vision for jest-circus? Conceptually, what is the interface that jest-circus provides? Is jest-circus intended to inject describe/beforeEach/afterEach/it/etc... into the global environment and then run the tests immediately?
I also have a couple of feature requests after looking though and using some of the jest-circus modules:
describe
calls). I would like to access jest-circus's state (either via the event handlers or withgetState
), display all the tests to the user, and then let the user choose which tests to run -> I want to take part of jest-circus's state and pass it torun()
instead ofrun()
using jest-circus's shared state. Perhaps jest-circus should be less stateful and more functional? (from the caller's perspective: add event listener -> calldescribe()
-> event listener gets state -> pass state intorun()
-> get results)global.it
,global.beforeEach
, etc? The reason is that I'd like to run the tests in the same JS context as the test-runner (similar to Jest's in-band mode) and don't want to modify the actual global object. So if I could pass an object into jest-circus to use as the global object, that'd be helpful.@aaronabramov cpojer tells me you would be a good person to ask about all this
BTW running jest-circus on the device (instead of driving the tests from Node) is pretty sweet. We can now access Views and other native APIs from within tests, really nice when the unit under test includes device state :D
The text was updated successfully, but these errors were encountered: