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

Fix gracefulExit() #22

Merged
merged 1 commit into from
Oct 16, 2022
Merged

Fix gracefulExit() #22

merged 1 commit into from
Oct 16, 2022

Conversation

jakobo
Copy link
Contributor

@jakobo jakobo commented Oct 12, 2022

This change moves the check for isCalled to the top of the exit() function. Previously, the synchronous check was being checked first, causing a console error when exit() performed the process.exit() at the end of the cleanup window.

Includes changes to fixture-async which allow us to control the type of exit we use when running the fixture, as well as an inclusion of the failure test.

Fixes #21

This change moves the check for isCalled to the top of the exit()
function. Previously, the synchronous check was being checked first,
causing a console error when exit() performed the process.exit() at the
end of the cleanup window.

Includes changes to fixture-async which allow us to control the type of
exit we use when running the fixture, as well as an inclusion of the
failure test.

Fixes sindresorhus#21
@sindresorhus sindresorhus changed the title fix: Checks call state before checking async/sync state on exit Fix gracefulExit() Oct 16, 2022
@sindresorhus sindresorhus merged commit 64e5907 into sindresorhus:main Oct 16, 2022
@sindresorhus
Copy link
Owner

Thanks for fixing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gracefulExit() always prints SYNCHRONOUS TERMINATION NOTICE
2 participants