Skip to content

Commit

Permalink
try to debug the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Mar 28, 2024
1 parent 32b797d commit 67aec62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Behat/JsCoverageContextTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ public function __destruct()
return;
}

$corrupted = false;
foreach ($this->jsCoverage as $p => $data) {
if (!str_contains(json_encode($data, \JSON_THROW_ON_ERROR), 'branchMap')) {
$corrupted = true;
var_dump($p);
}
}

$outputFile = __DIR__ . '/../../coverage/js/' . hash('sha256', microtime(true) . random_bytes(64)) . '.json';
file_put_contents($outputFile, json_encode($this->jsCoverage, \JSON_THROW_ON_ERROR));
}
Expand Down

0 comments on commit 67aec62

Please sign in to comment.