Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2022-05-27 03:01:45 +0300
committerGitHub <noreply@github.com>2022-05-27 03:01:45 +0300
commit229c9c4ec4dce7dc96e4599e0ae7320005fcfb46 (patch)
treee069942f7fac2599921f5dd49b81c50235039941
parent1b964c6ba971121fa18730165c664391a9ff3db5 (diff)
ignore linkSync errors in custom chai assertion to avoid error in Funnels build (#19264)
-rw-r--r--tests/lib/screenshot-testing/support/chai-extras.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/lib/screenshot-testing/support/chai-extras.js b/tests/lib/screenshot-testing/support/chai-extras.js
index 2160673845..80871f7342 100644
--- a/tests/lib/screenshot-testing/support/chai-extras.js
+++ b/tests/lib/screenshot-testing/support/chai-extras.js
@@ -92,7 +92,11 @@ module.exports = function makeChaiImageAssert(comparisonCommand = 'compare') {
// copy to diff dir for ui tests viewer (we don't generate diffs w/ compare since it slows the tests a bit)
if (!fs.existsSync(diffPath)) {
- fs.linkSync(expectedPath, diffPath);
+ try {
+ fs.linkSync(expectedPath, diffPath);
+ } catch (e) {
+ console.log(`Failed to copy ${expectedPath} to ${diffPath}`);
+ }
}
}