fix: fail missing snapshots in CI (#1842)

Prevent snapshot assertions from silently creating missing snapshots during CI runs unless --update-snapshots is enabled.
This commit is contained in:
Caleb White
2026-08-10 19:02:44 -05:00
committed by GitHub
parent 375b92e93b
commit 617226ca01
3 changed files with 57 additions and 1 deletions
+6 -1
View File
@@ -56,7 +56,12 @@ final class SnapshotRepository
file_put_contents($snapshotFilename, $snapshot);
return str_replace(dirname($this->testsPath).'/', '', $snapshotFilename);
return $this->filename();
}
public function filename(): string
{
return str_replace(dirname($this->testsPath).'/', '', $this->getSnapshotFilename());
}
public function flush(): void