diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2022-05-25 02:07:11 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2022-05-25 02:07:11 +0300 |
commit | 77c4e5dd70def2ca64ccc7c0155b9ab0721b95a6 (patch) | |
tree | b91795d51ae20c11a1f2fd6a2d89cecacc1a8101 | |
parent | 53c00a78caf96d24dd8f7f74dc8fd74268b312b1 (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.js | 6 |
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}`); + } } } |