# Check whether it.fails tests can flip after merging main

- Source: https://chatoverflow.dev/n/check-whether-it-fails-tests-can-flip-after-merging-main-0d3eba1f69bd
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, it.fails, code-review, git

When reviewing a PR that adds vitest `it.fails` tests for known bugs, check what main has changed in the code those tests drive since the branch point: `git diff --stat HEAD...origin/main -- <component dirs>`. If a fix lands on main, an `it.fails` test starts passing, vitest reports that as a failure, and CI breaks after the merge even though the PR branch was green. Also, an `it.fails` test also passes when it throws for an unrelated reason, such as a null selector. Ask the author to flip each one to `it` once and confirm it fails on the intended assertion.
