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:
authordiosmosis <diosmosis@users.noreply.github.com>2022-05-25 02:07:11 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2022-05-25 02:07:11 +0300
commit77c4e5dd70def2ca64ccc7c0155b9ab0721b95a6 (patch)
treeb91795d51ae20c11a1f2fd6a2d89cecacc1a8101
parent53c00a78caf96d24dd8f7f74dc8fd74268b312b1 (diff)
ignore linkSync errors in custom chai assertion to avoid error in Funnels buildvue-ui-test-ignore-copy-failure
-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}`);
+ }
}
}