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
fix: jest-circus shares events among imports #11483 #11529
base: main
Are you sure you want to change the base?
Conversation
Hi @satanTime! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
packages/jest-circus/src/__tests__/__snapshots__/eventHandler.test.ts.snap
Outdated
Show resolved
Hide resolved
packages/jest-circus/src/__tests__/__snapshots__/eventHandler.test.ts.snap
Outdated
Show resolved
Hide resolved
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Codecov Report
@@ Coverage Diff @@
## main #11529 +/- ##
==========================================
- Coverage 68.47% 68.41% -0.07%
==========================================
Files 324 324
Lines 16967 16972 +5
Branches 5060 5062 +2
==========================================
- Hits 11618 11611 -7
- Misses 5317 5329 +12
Partials 32 32
Continue to review full report at Codecov.
|
8315535
to
7c70335
Compare
Tks for this PR. Looking forward for seeing it released. I don't see any issue with the code, like the approach.
Exposing testing events in the API makes so much sense that I basically assumed it was there when I started using Jest, only to find out that it wasn't. The proposed changes seem in line with what's already in there. One may argue that this is a feature, not a fix, and adjust the CHANGELOG.md entry, but other than that, things look fine.
HI @SimenB, the PR has been rebased. |
a37105c
to
ee436cb
Compare
HI @SimenB, the PR has been rebased. |
Hi @SimenB, the PR has been rebased. |
fad07ab
to
3f03ebf
Compare
Hi @SimenB, the PR has been rebased. |
902c7c2
to
1206b5b
Compare
526902a
to
e99a588
Compare
Hi @SimenB, might you explain what the problem with this PR is? |
Hi @satanTime! I'd just like to say thank you for sticking by this PR without any feedback from me. Unfortunately, I've had little to no combination of time, effort, energy or plain want to work on OSS for months, so this (and other stuff) has just been hanging. The entire Hopefully I'll come back to it sooner rather than later, but PRs such as this (where the code itself isn't the hard part, but rather if the underlying issue is something we should support and secondly if the solution here is correct) is not something I'm currently in the correct place to consider |
@SimenB I'm curious, are you the only maintainer of jest now? Is facebook not supporting this project internally anymore? |
Nobody at FB (Meta?) has worked on Jest for years at this point, beyond a few PRs here and there like any other open source contributor |
Hi @SimenB, glad to see you alive :) And happy new year! Open source is huge pain in the hole :) I hope nobody will give up, only the brave! I've rebased the PR. Please let me know if there is anything I need to change / explain etc :) |
Regarding the issue, I think it's context hell. Different dependencies require |
I honestly though you were working for Facebook in development of Jest, what a shame :-( |
I commented it on Twitter: https://twitter.com/mafalda_sfu/status/1488600128680341517 We need to make noise, @meta is still publicing Jest as from them but they are not maintaining anymore, while in fact they should have contracted @SimenB to maintaining it, that's the fair thing to do on this topic. |
(To avoid potential drama I definetely do not have the energy for, I'll make this preemptive post). Just to make sure everybody is on the same page - while FB has never paid me (or, as far as I know, any other non-employee) to work on Jest, that doesn't mean there hasn't been opportunities to be paid for the work I and others have put into the project. Specifically the Open Collective has been available, and I've been told multiple times to file expenses against it. However, personally, I've preferred to keep the time I've spent on this project without compensation to avoid feeling compelled to work on it. It might be idealistic, but by not getting paid for the work I've purposefully kept the project from something I've felt obligated to work on. I think by taking the money I'd feel obligated (rightly!) to dedicate time to the project. Which I've never felt comfortable doing. This is a personal choice to keep my independence (and freedom to not interact with the project as much as I probably should the last months), but does not reflect on FB's/Meta's motivations or priorities. My personal choices doesn't mean FB has expected me to work for free, just that I've chosen not to take salary/compensation. That said I want to be clear there's no "bad guy" here - nobody is forcing me to (or trying to) work on things, and my off hands approach is solely down do lack of time and energy, and not any deeper motivation. Jest has been an open source project for years and continues to be so. Anybody missing any features should continue to feel free to contribute to make those features happen. (For transparency, FB paid for my and other OSS maintainers trip to London to work physically together on the project back in 2017 and 2018. I can provide more details if people want) |
Hi all, could we keep this thread related to the PR with no drama and a pure focus on solving the issue? |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @SimenB, the PR has been rebased. The issue is context: currently it is like that: const a = () => {
const context = {};
return context;
};
a() === a(); // false when it should be global.context = global.context || {};
const a = () => {
return global.context;
};
a() === a(); // true and everybody is happy |
Hi @satanTime, Seeing the time needed for this to be merged, maybe you could publish a gist to use along with https://www.npmjs.com/package/patch-package, installed via a postinstall script ? Just wondering if this is doable.... I'm having the feeling that this package, used by a lot of people, would gain by redefining contributors permissions & include more people, so that you/we could have more people to talk to to bring evolutions in. Cheers |
Hi @GerkinDev, it's a good idea, thanks for the hint. I just need to find time to implement it. |
I wanted to give an update, in order to address the maintenance concerns mentioned in this thread, Jest has been transferred to a foundation. Hopefully this will help! https://engineering.fb.com/2022/05/11/open-source/jest-openjs-foundation/ |
closes #11483
Summary
The issue is described here: #11483
A public interface to subscribe to events from
jest-circus
.Test plan
No changes in UI.