testing-library / dom-testing-library

🐙 Simple and complete DOM testing utilities that encourage good testing practices.

Home Page:https://testing-library.com/dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github actions - tests pass but execution fails on Process completed with exit code 1.

gnesher opened this issue · comments

  • @testing-library/dom version: 7.31.2
  • Testing Framework and version: @testing-library/jest-dom 5.11.4
  • Jest 26.0.15
  • DOM Environment:
    jsdom 27.4.4

Relevant code or config:

N/A

What you did:

Runnig test suit passes fine locally and all tests are reported to have passed successfully on github actions i.e.

Test Suites: 25 passed, 25 total
Tests:       163 passed, 163 total
Snapshots:   85 passed, 85 total
Time:        515.31 s
Ran all test suites matching /^.*\/[C][\w-]*\.test/i.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

But tests still fail with exit code 1

Problem description:

Tests pass successfully but the test fails on Github Actions with error code 1 while reporting all tests passed

Suggested solution:

The last time we encountered this issue we solved it by ensuring that waitFor is limited to 1 except (but while this isn't recommended according to https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#having-multiple-assertions-in-a-single-waitfor-callback - it shouldn't cause this

Hi @gnesher! Thanks for opening this one.
The last version of DTL 7 was released almost 3 years ago, we're not supporting that anymore and a lot has changed since then.
Any chance you can upgrade the libraries you're using to see if it still reproduces?
Thanks.