Removed direct use of @tryghost/jest-snapshot

refs https://github.com/TryGhost/Toolbox/issues/499
refs 6bcc47a0ad

- Using module directly caused issues with snapshots manager instance initialization (mocha hooks did not apply to a correct instance)
- See refed commit for more
This commit is contained in:
Naz 2023-01-17 11:12:26 +08:00
parent 1f6b2b4d5e
commit 112ab23968
No known key found for this signature in database
3 changed files with 8 additions and 19 deletions

View File

@ -201,8 +201,7 @@
},
"devDependencies": {
"@playwright/test": "1.29.2",
"@tryghost/express-test": "0.11.8",
"@tryghost/jest-snapshot": "0.5.0",
"@tryghost/express-test": "0.12.0",
"@tryghost/webhook-mock-receiver": "0.2.3",
"@types/common-tags": "1.8.1",
"c8": "7.12.0",

View File

@ -1,6 +1,6 @@
const should = require('should');
const errorProps = ['message', 'errorType'];
const {matchSnapshotAssertion} = require('@tryghost/jest-snapshot');
const {matchSnapshotAssertion} = require('@tryghost/express-test').snapshot;
should.Assertion.add('JSONErrorObject', function () {
this.params = {operator: 'to be a valid JSON Error Object'};

View File

@ -4367,12 +4367,12 @@
lodash "^4.17.21"
uuid "^9.0.0"
"@tryghost/express-test@0.11.8":
version "0.11.8"
resolved "https://registry.yarnpkg.com/@tryghost/express-test/-/express-test-0.11.8.tgz#96cd84e2746670bdc848c806137327d9a5ed1bcb"
integrity sha512-KyiaZc9/+cZCrSl6Ryc9Lt8MnPxbM0WX0kQ9W70LWZikJOX+Ae10FV1/JHa074kHne4dmXaW8vnl+uTO4zDLjw==
"@tryghost/express-test@0.12.0":
version "0.12.0"
resolved "https://registry.yarnpkg.com/@tryghost/express-test/-/express-test-0.12.0.tgz#0b96201cadffa615a32e13d225c4cb6871292f0c"
integrity sha512-hLtPj/GrjYo52mQpWhkPa386cEKZ2RrzwsHQmE3zfOu3PEqNlLB+4hf0J7SW4gpiHhBtEneytYvj20q2c75qIg==
dependencies:
"@tryghost/jest-snapshot" "^0.4.8"
"@tryghost/jest-snapshot" "^0.5.0"
cookiejar "^2.1.3"
reqresnext "^1.7.0"
@ -4416,7 +4416,7 @@
optionalDependencies:
sharp "^0.30.0"
"@tryghost/jest-snapshot@0.5.0":
"@tryghost/jest-snapshot@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@tryghost/jest-snapshot/-/jest-snapshot-0.5.0.tgz#1250a64ecadfecf3f2ab45d5077a9778f2c4ec25"
integrity sha512-vw8bEYtIdui1+j4XrR+4HsD6bu2B8MdzImVvawAnxAoPO5fODYe/wWXKNKvraPdpe9pgNQOClQxm9QAF6y8jSw==
@ -4426,16 +4426,6 @@
"@tryghost/errors" "^1.2.20"
jest-snapshot "^29.0.0"
"@tryghost/jest-snapshot@^0.4.8":
version "0.4.8"
resolved "https://registry.yarnpkg.com/@tryghost/jest-snapshot/-/jest-snapshot-0.4.8.tgz#434ce54774334af78e6654b2f7be0bb3c87d7af5"
integrity sha512-bLF0QIE60+ilHi51BHvR8en5gGBnC4VU2jmksIdhQZywlRTLCvYQpxyraSjsUeq5ou5gGHPRChpA/TyvmWLWzg==
dependencies:
"@jest/expect" "^28.0.1"
"@jest/expect-utils" "^28.0.1"
"@tryghost/errors" "^1.2.20"
jest-snapshot "^29.0.0"
"@tryghost/kg-card-factory@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@tryghost/kg-card-factory/-/kg-card-factory-4.0.0.tgz#01212a872cbac937aa11b13c904442fa369abbc8"