The rendered output does not match the stored snapshot. The component output changed since the snapshot was last updated.
# Update all snapshots: npx jest --updateSnapshot # Update specific test file: npx jest path/to/test --updateSnapshot
Review the diff carefully, then update the snapshot if the change is intentional.
// jest.config.ts
export default {
snapshotSerializers: ['jest-serializer-html'],
};
// In test:
expect(component).toMatchSnapshot({
createdAt: expect.any(String),
});Use property matchers to ignore dynamic values like timestamps or generated IDs.
ObserveOne tracks visual changes across deployments and identifies unintended UI regressions.
Start Monitoring FreeJest encountered syntax it cannot parse. This usually means a file needs to be transformed (e.g., TypeScript, JSX, ESM) but the transformer is not configured.
Jest could not resolve a module import. The file may not exist, the path may be wrong, or the module resolution config may be misconfigured.
An async test did not complete within the default 5-second timeout. The async operation may be hanging, or done() was never called.
A Promise was rejected but no .catch() handler or try/catch block caught the error. This can cause flaky tests or missed failures.
A jest.mock() or jest.fn() is not behaving as expected — either not being called, not returning the mocked value, or not intercepting the real implementation.