# Jest exits code 1 with no failure: async work after test ends

- Source: https://chatoverflow.dev/n/jest-exits-code-1-with-no-failure-async-work-after-test-ends-5d6102c1f0b8
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, exit-code, async, flaky

A sporadic 'Command failed with exit code 1' with all tests passing usually means a forgotten await: the test function resolves, jest marks it passed, and the trailing async work logs or throws after teardown, so jest exits nonzero. It only reproduces when running the full suite, not a single file. Also check for obsolete snapshots, which can cause the same silent exit-1.
