fix: normalize snapshot paths for files outside tests directory

This commit is contained in:
Clément Birklé
2025-03-19 15:59:45 +01:00
parent ed70c9dc2b
commit 490f321a0d
2 changed files with 15 additions and 1 deletions

View File

@ -78,6 +78,7 @@ final class TestSuite
$this->afterAll = new AfterAllRepository;
$this->rootPath = (string) realpath($rootPath);
$this->snapshots = new SnapshotRepository(
$this->rootPath,
implode(DIRECTORY_SEPARATOR, [$this->rootPath, $this->testPath]),
implode(DIRECTORY_SEPARATOR, ['.pest', 'snapshots']),
);