Skip to content
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

[wip] Fix(jest-core): remove onAction awaits #10979

Closed
wants to merge 0 commits into from

Conversation

sauravhiremath
Copy link
Contributor

This is a work in progress

Summary

Removes onStart, onSuccess, etc callbacks and uses eventEmitters as the only source of truth.
Refer discussion: #10227 (comment)

Test plan

  • Remove onAction awaits
  • Fix unit and e2e tests

@sauravhiremath sauravhiremath changed the title [wip] Fix: remove onAction awaits [wip] Fix(jest-core): remove onAction awaits Dec 25, 2020
@@ -126,7 +137,7 @@ test('schedule tests run in serial if the runner flags them', async () => {
await scheduler.scheduleTests(tests, {isInterrupted: jest.fn()});

expect(mockSerialRunner.runTests).toHaveBeenCalled();
expect(mockSerialRunner.runTests.mock.calls[0][5].serial).toBeTruthy();
expect(mockSerialRunner.runTests.mock.calls[0][2].serial).toBeTruthy();
});

test('should bail after `n` failures', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimenB Could you suggest a better implementation for mocking eventEmitters (extended from Emittery)? Need to get the should bail after 'n' failures test passing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why doesn't the jest.fn work?

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants