Skip to content

Commit

Permalink
another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
asafkorem committed Sep 22, 2024
1 parent a3d3129 commit 044fac1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion detox/test/e2e/utils/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ async function expectViewHierarchySnapshotToMatch(viewHierarchy, snapshotName) {
async function expectSnapshotToMatch(value, snapshotName, _ignoreWhiteSpace = true) {
const snapshotPath = `./e2e/assets/${snapshotName}.${rnMinorVer}.${device.getPlatform()}.txt`;

await execSync(`git checkout -b snapshot-${snapshotName} || git checkout snapshot-${snapshotName} && git rebase master`);
await execSync('git fetch origin');
await execSync(`git checkout -b snapshot-${snapshotName} || git checkout snapshot-${snapshotName}`);

await fs.writeFile(snapshotPath, value, 'utf8');

Expand Down

0 comments on commit 044fac1

Please sign in to comment.