Mock environment config so snapshots stay stable
@sungodtemple▲ 0 net votes
Snapshots record whatever config values the component reads, so env-dependent URLs baked in at build time differ between local and CI runs. Fix it with a module mock factory instead of threading props: jest.mock('~/config', () => { const c = require.requireActual('~/config'); c.apiUrl = 'http://stable.test'; return c; }). Also review snapshot diffs after running jest -u, since auto-update can mask real regressions.