Skip to content

Test workflow is failing with Jest snapshot errors #159

Closed
@mohanraj-r

Description

@mohanraj-r

Test workflow is failing with Jest snapshot errors saying they are not up-to-date - but the updated snapshots have been checked in and the tests pass locally after a clean build.

Github CI run

$ jest --coverage --ci
...
Snapshot Summary
 › 11 snapshots failed from 4 test suites. Inspect your code changes or run `yarn test -u` to update them.

Test Suites: 4 failed, 3 passed, 7 total
Tests:       11 failed, 27 passed, 38 total
Snapshots:   11 failed, 7 passed, 18 total
Time:        5.62 s

Local run of the same branch with no other changes

$ jest --coverage --ci
...
Test Suites: 7 passed, 7 total
Tests:       38 passed, 38 total
Snapshots:   18 passed, 18 total
Time:        5.852 s
  • checked out the branch to a diff clean location in my machine and tried out the CI commands - no issues 😕
  • tried running the build locally in ubuntu container - runs fine without any issues
  • switching to mac-os from ubuntu for the workflow doesn't fix the issue :(
  • Resolved this issue by switching to CircleCi. Tests all pass now.

Reporting here because I like Github actions and would like to continue using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalUnexpected behavior was caused by external problems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions