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

adding debug printings makes my test pass - any reason why? #1383

Open
maksnester opened this issue Feb 24, 2025 · 0 comments
Open

adding debug printings makes my test pass - any reason why? #1383

maksnester opened this issue Feb 24, 2025 · 0 comments

Comments

@maksnester
Copy link

maksnester commented Feb 24, 2025

jest.bug.720.mov

can anyone explain to me why adding screen.debug or logTestingPlaygroundURL to the test code makes the test pass?

I was refactoring a test, trying to speed it up a bit by replacing the unnecessary find* selector with the query selector (when I check that something is not on the page) but it made one of my tests fail and I tried to debug it and I can't because adding debug printings makes the test pass ¯\(ツ)

I'm not even adding a new import of the screen - it is already there.

Any thoughts?

    "@testing-library/dom": "10.4.0",
    "@testing-library/jest-dom": "6.6.3",
    "@testing-library/react": "16.2.0",
    "@testing-library/user-event": "14.6.1",
    "es-jest": "2.1.0",
    "jest": "29.7.0",
    "jest-environment-jsdom": "29.7.0",
    "jest-fixed-jsdom": "0.0.9",
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

No branches or pull requests

1 participant