Skip to main content
For CLI runs, create or update the baseline with momentic run --update-golden-files. The CLI stores generated baselines under goldenFileDir (default: golden/visual-diff under the project root). A normal run fails if the baseline is missing. Subsequent runs compare the current screenshot against the baseline and fail when the difference exceeds threshold. The bare form - visualDiff compares the full viewport. Use on or css to compare an element; coordinate targets are not supported.

Parameters

Shorthand

Bare command. Diffs the full viewport.

Examples