-
-
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
Improve jest-circus interop with IntelliJ #9468
Comments
Comments from original thread:
|
@segrey I own you an apology: I originally thought that the js files used by IntelliJ were packed into the jar, but I see they're on disk. Having those sources should hopefully make things a bit easier, as it means just comparing all the APIs that are used, and ensuring there are equivalents. Unfortunately I can't actually edit them, which I am a bit surprised about - I didn't think an application could lock out the Windows superuser, but I don't feel a strong urge to brick my laptops permissions quite yet 😂 |
@jeysal How hard do you think it'd be to add that? I mean, when you say "without private imports" does that mean it could be roughly a matter of just making those imports not private? (or maybe just documentation private?). Even if that just gets us half the way that would be progress. |
As an IntelliJ user myself, I'm very keen to support integration with it as well as possible.
If you use the publicly documented features, it is. The Jasmine API (including the reporters) aren't documented, so that's not included in that compatibility promise.
It might also paint us into a corner though. One idea with circus is that people should be able to do I think an interesting approach to solving this issue might be to look into exposing all circus events on the reporter somehow (essentially funnel Any reason not to have this discussion in #8840 though? |
Ah, a surprise indeed. At least you can download IDE as a .zip archive from https://www.jetbrains.com/idea/download/#section=windows and extract to a convenient location. |
I was thinking that this issue targets direct consumption of #9001 looks promising, cool.
Do you mean to rewrite a Jest reporter as |
The orthogonal part I was referring to is reporting events from the worker to the parent process while it's running, instead of the single request-response flow that's there today. For our purposes here (a refactor of the current features of the reporter) that restraint doesn't matter. Consuming |
@SimenB Thanks for the quick reply and for the details! Totally agree with making reporters more powerful, that would be a relief for integrations! |
@SimenB @segrey huge thanks for your detailed responses! I've only just started to have the time to response due to a sudden explosion of work, but I plan to try and tackle at least some of #8840 over the weekend.
That makes complete sense - thanks for clarifying 👍
Ah yes good point - I'll do that :)
Sort of - I made this issue to avoid bogging down the original with something that isn't a direct blocker. I consider this issue to be a sort of Epic or milestone, where the focus is on figuring out the answer to the question in the title: What is required for interop with IntelliJ? and following that, the tracking of the issues opened to in turn track the specific action points we come up with here :) Having identified that #8840 is a chief milestone for achieving the goal set by this issue, I'm happy for the conversation related to that to be moved over there 🙂 |
I've added this to the 26.x milestone because I believe that before circus becomes the default, it should integrate well with developer tooling, and that should have been proven in a Jest minor version. |
Updating this thread as of the current WebStorm WAP (WebStorm 2021.1 EAP, Build #WS-211.5538.3, built on February 1, 2021)
I do see those now: A new issue I see is that while the test is still executing, all describes still show the spinner, even though the This is a bigger problem for large test suites, because the user can't easily tell which tests are still executing. Another issue is that WebStorm shows "Expected :undefined / Actual :undefined" on this code: test('jest-circus - undefined not useful', () => {
const obj = {
a: [1, { foo: 'bar' }],
};
expect(obj).toMatchObject({
a: [1],
});
}); Those two lines don't show in the console output, or in WebStorm without jest-circus. |
@SimenB @segrey I'm going to close this given we landed my PR which exposed the failure details combined with the YT issue on the IDEA side that implemented the inline preview support that the While I'm sure there will be further improvements to be made on both sides, it's probably going to be best to create new issues to track those. @dandv I've checked your code example, and WebStorm no longer shows the "Expected/Actual" as being undefined:
I suspect the spinner problem you've mentioned is best reported on YouTrack, as it's likely an IDEA thing rather than |
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. |
🚀 Feature Proposal
This is a split off #6295 after talking to @segrey.
While
jest-circus
has a lot of cool things, and seems fairly stable & feature-full, it doesn't seem to provide the same level of detail that can be obtained by usingjasmine
, which means IntelliJ can't enhance it's test reporter subsystem to do cool things like showing inline diffs & editor-level highlighting of erroring matchers (i.e red squiggles & popup messages a la eslint & ts).It would be great to scope out what's required to allow IntelliJ to support
jest-circus
in the same manner as it doesjasmine2
.Motivation
Interop is cool, and it'll make migration to
jest-circus
even better for JetBrains users, since they'll not notice a difference in how their IDE behaves.Related to #8840
The text was updated successfully, but these errors were encountered: