From f0bda014ab053cdf38b06eaad374ea829c237de2 Mon Sep 17 00:00:00 2001 From: Naz Date: Thu, 17 Feb 2022 11:01:04 +0700 Subject: [PATCH] Fixed misconfigured SnapshotManager in e2e tests refs https://github.com/TryGhost/Toolbox/issues/210 - After updating to the newest `@tryghost/express-test`, it's dependency `@tryghost/jest-snapshot` was missmatched with the one used in Ghost itself. This caused multiple instances of SnapshotManager class in the system, which is meant to be a singleton! - The issue was causing following error to appear: "IncorrectUsageError: Unable to run snapshot tests, current test was not configured" --- package.json | 2 +- yarn.lock | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 983411b7a8..cac3ae7348 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "devDependencies": { "@lodder/grunt-postcss": "3.1.1", "@tryghost/express-test": "0.5.0", - "@tryghost/jest-snapshot": "0.3.1", + "@tryghost/jest-snapshot": "0.3.2", "c8": "7.11.0", "coffeescript": "2.6.1", "cssnano": "5.0.17", diff --git a/yarn.lock b/yarn.lock index a982d91077..3bcf4ac5fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1714,16 +1714,7 @@ optionalDependencies: sharp "^0.29.0" -"@tryghost/jest-snapshot@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@tryghost/jest-snapshot/-/jest-snapshot-0.3.1.tgz#0fdc1a272cea407bb3e2af23a2ce3cd4d07431fe" - integrity sha512-pXxp+jigNVt3OTMFaX5BpmFufRjPj0en7cU8IAoVOkNa5Jt7cG7DL2l8QkPaMNu1GbJM6inMjqCYoeEw3ZjHIg== - dependencies: - "@tryghost/errors" "^1.2.1" - expect "^27.5.0" - jest-snapshot "^27.5.0" - -"@tryghost/jest-snapshot@^0.3.2": +"@tryghost/jest-snapshot@0.3.2", "@tryghost/jest-snapshot@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@tryghost/jest-snapshot/-/jest-snapshot-0.3.2.tgz#11c20b3f8dee5918d5754634b9cef4b1ef3b6a60" integrity sha512-mevHniOmAuqfWKtHKtKuU/+INmYOiE4GJyuntJcTr4MncgZCtQqRCOU+EiAvUqE/BU36n9lvAfQ2j/p4Ji9bYw==