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

test: Add test for flushing before exiting waitFor #1215

Merged
merged 4 commits into from
May 28, 2023

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 22, 2023

Tests in #1137 didn't actually show why we need it.

New tests fail without #1137 (https://github.com/testing-library/react-testing-library/actions/runs/5047921618/jobs/9055439894?pr=1215) but pass with latest code.

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 22, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7d25eec:

Sandbox Source
React Configuration
react-testing-library-examples Configuration

This reverts commit 7cf22ce.

New tests showcase why we need this
@eps1lon eps1lon changed the title fix: Remove redundant microtask flush test: Add test for flushing before exiting waitFor May 22, 2023
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #1215 (7d25eec) into main (5dc81dc) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1215   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          192       192           
  Branches        40        38    -2     
=========================================
  Hits           192       192           
Flag Coverage Δ
canary 100.00% <ø> (ø)
experimental 100.00% <ø> (ø)
latest 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@eps1lon eps1lon marked this pull request as ready for review May 22, 2023 16:23
src/__tests__/end-to-end.js Outdated Show resolved Hide resolved
@eps1lon eps1lon merged commit 6b4180e into testing-library:main May 28, 2023
13 checks passed
@eps1lon eps1lon deleted the wait-for-flush branch May 28, 2023 09:03
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.

None yet

1 participant