Skip to content

feat: add dont-cleanup-after-each.js #435

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

Merged
merged 1 commit into from
Aug 10, 2019
Merged

Conversation

kentcdodds
Copy link
Member

@kentcdodds kentcdodds commented Aug 10, 2019

What: add dont-cleanup-after-each.js

Why:

This makes it easier for folks who don't want to write their tests in an isolated way. It's totally not recommended, but it will hopefully reduce pain while people migrate from one testing style to another.

How:

This is just a simple file that sets the RTL_SKIP_AUTO_CLEANUP environment variable so that RTL doesn't setup automatic cleanup.

Checklist:

  • Documentation added to the
    docs site done
  • Tests N/A
  • Typescript definitions updated N/A
  • Ready to be merged

I decided to do this after reading #430 (comment)

This is just a simple file that sets the RTL_SKIP_AUTO_CLEANUP environment variable so that RTL doesn't setup automatic cleanup. This makes it easier for folks who don't want to write their tests in an isolated way. It's totally not recommended, but it will hopefully reduce pain while people migrate from one testing style to another.
@codecov
Copy link

codecov bot commented Aug 10, 2019

Codecov Report

Merging #435 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #435   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          90     90           
  Branches       13     13           
=====================================
  Hits           90     90

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8277b06...adefd9b. Read the comment docs.

@kentcdodds
Copy link
Member Author

I'd love someone else to merge this. I've been a bit merge-happy recently 😅

@@ -0,0 +1 @@
process.env.RTL_SKIP_AUTO_CLEANUP = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be browser-safe?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it is worth the effort.

@alexkrolick alexkrolick merged commit f4b813e into master Aug 10, 2019
@kentcdodds
Copy link
Member Author

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kentcdodds kentcdodds deleted the pr/dont-cleanup-after-each branch March 12, 2020 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants