feat(blocksAntd): add jest-serializer-html to serialize enzyme snapshots

This commit is contained in:
Gervwyk 2020-11-18 18:09:51 +02:00
parent cda1d1ecf8
commit 4190279f0d
6 changed files with 44 additions and 2 deletions

21
.pnp.js generated
View File

@ -3608,6 +3608,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["html-webpack-plugin", "virtual:65bbdbc833194d48af8b473ccb9eb396af4cb12a8148bcea865208cb4df1306b9afb0a62408cbd348e6f2af9b92764096868c744881c07da8a59708a1c9cb4f4#npm:4.5.0"],
["identity-obj-proxy", "npm:3.0.0"],
["jest", "npm:26.6.3"],
["jest-serializer-html", "npm:7.0.0"],
["js-yaml", "npm:3.14.0"],
["less", "npm:3.12.2"],
["less-loader", "virtual:65bbdbc833194d48af8b473ccb9eb396af4cb12a8148bcea865208cb4df1306b9afb0a62408cbd348e6f2af9b92764096868c744881c07da8a59708a1c9cb4f4#npm:7.1.0"],
@ -10140,6 +10141,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD",
}]
]],
["diffable-html", [
["npm:4.0.0", {
"packageLocation": "./.yarn/cache/diffable-html-npm-4.0.0-76090d3045-d37f5370a1.zip/node_modules/diffable-html/",
"packageDependencies": [
["diffable-html", "npm:4.0.0"],
["htmlparser2", "npm:3.10.1"]
],
"linkType": "HARD",
}]
]],
["dir-glob", [
["npm:2.2.2", {
"packageLocation": "./.yarn/cache/dir-glob-npm-2.2.2-932e08b501-1ee89c351e.zip/node_modules/dir-glob/",
@ -14725,6 +14736,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD",
}]
]],
["jest-serializer-html", [
["npm:7.0.0", {
"packageLocation": "./.yarn/cache/jest-serializer-html-npm-7.0.0-2b593bfb63-21808d681e.zip/node_modules/jest-serializer-html/",
"packageDependencies": [
["jest-serializer-html", "npm:7.0.0"],
["diffable-html", "npm:4.0.0"]
],
"linkType": "HARD",
}]
]],
["jest-snapshot", [
["npm:26.6.2", {
"packageLocation": "./.yarn/cache/jest-snapshot-npm-26.6.2-b91f41a0f2-9cf50bd7b7.zip/node_modules/jest-snapshot/",

Binary file not shown.

View File

@ -22,4 +22,5 @@ module.exports = {
'\\.js?$': 'babel-jest',
},
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'yaml', 'css'],
snapshotSerializers: ['jest-serializer-html'],
};

View File

@ -34,7 +34,7 @@
"prepublishOnly": "yarn build",
"start": "webpack serve --config webpack.demo.js",
"start:dev": "webpack serve --config webpack.dev.js",
"test": "jest --coverage --config jest.config.js --no-cache",
"test": "jest --coverage --config jest.config.js",
"version:prerelease": "yarn version prerelease",
"version:patch": "yarn version patch -d",
"version:minor": "yarn version minor -d",
@ -72,6 +72,7 @@
"html-webpack-plugin": "4.5.0",
"identity-obj-proxy": "3.0.0",
"jest": "26.6.3",
"jest-serializer-html": "7.0.0",
"js-yaml": "3.14.0",
"less": "3.12.2",
"less-loader": "7.1.0",

View File

@ -2775,6 +2775,7 @@ __metadata:
html-webpack-plugin: 4.5.0
identity-obj-proxy: 3.0.0
jest: 26.6.3
jest-serializer-html: 7.0.0
js-yaml: 3.14.0
less: 3.12.2
less-loader: 7.1.0
@ -7872,6 +7873,15 @@ __metadata:
languageName: node
linkType: hard
"diffable-html@npm:^4.0.0":
version: 4.0.0
resolution: "diffable-html@npm:4.0.0"
dependencies:
htmlparser2: ^3.9.2
checksum: d37f5370a13f5a55a621b8b7ee1e77b59ecb1f0d03cad331aa390b33b56d3a816668c1096e31fda9759c2d9525cdea709a0f0f4e489340a969694227b5a91767
languageName: node
linkType: hard
"dir-glob@npm:^2.2.2":
version: 2.2.2
resolution: "dir-glob@npm:2.2.2"
@ -10395,7 +10405,7 @@ fsevents@^1.2.7:
languageName: node
linkType: hard
"htmlparser2@npm:^3.3.0, htmlparser2@npm:^3.9.1":
"htmlparser2@npm:^3.3.0, htmlparser2@npm:^3.9.1, htmlparser2@npm:^3.9.2":
version: 3.10.1
resolution: "htmlparser2@npm:3.10.1"
dependencies:
@ -11890,6 +11900,15 @@ fsevents@^1.2.7:
languageName: node
linkType: hard
"jest-serializer-html@npm:7.0.0":
version: 7.0.0
resolution: "jest-serializer-html@npm:7.0.0"
dependencies:
diffable-html: ^4.0.0
checksum: 21808d681e5f4ab0246e1eaeaba837637411ddc91823c3a3803da7ce80dc223a192b6091903eedd365224be34acac9fe935353c47711f343044307139efdf437
languageName: node
linkType: hard
"jest-serializer@npm:^26.6.2":
version: 26.6.2
resolution: "jest-serializer@npm:26.6.2"