Skip to content

Commit f07280e

Browse files
committed
Fix prepublish script and jest tests
1 parent 159725b commit f07280e

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.babelrc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,5 @@
77
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
88
["@babel/plugin-proposal-private-methods", { "loose": true }]
99
],
10-
"sourceMaps": "inline",
11-
"ignore": [
12-
"**/__tests__",
13-
"**/__mocks__",
14-
"**/*.test.ts",
15-
"**/*.test.tsx",
16-
"**/setupTests.ts"
17-
]
10+
"sourceMaps": "inline"
1811
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@storybook/addon-links": "^6.2.9",
1818
"@storybook/react": "^6.2.9",
1919
"@storybook/storybook-deployer": "^2.8.7",
20+
"@types/enzyme": "^3.10.8",
2021
"@types/jest": "^26.0.23",
2122
"@types/jest-axe": "^3.5.1",
2223
"@types/node": "^15.0.2",
@@ -65,14 +66,14 @@
6566
"cleanup": "rm -rf dist/ > /dev/null && rm -rf lib/ > /dev/null",
6667
"storybook": "start-storybook -p 6006",
6768
"build:dist": "rollup -c",
68-
"build:lib": "NODE_ENV=production babel src --out-dir lib --extensions \".ts,.tsx\"",
69+
"build:lib": "NODE_ENV=production babel src --out-dir lib --extensions \".ts,.tsx\" --ignore \"**/__tests__,**/__mocks__,**/setupTests.ts\"",
6970
"build": "yarn cleanup && yarn build:dist && yarn build:lib",
7071
"test": "jest",
7172
"test:ci": "jest --coverage",
7273
"lint": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}' --fix",
7374
"lint:ci": "eslint 'src/**/*.{js,ts,tsx}' 'stories/**/*.{js,ts,tsx}'",
7475
"build-storybook": "build-storybook",
75-
"prepublish": "yarn install && yarn build"
76+
"prepublishOnly": "yarn lint:ci && yarn test:ci && yarn start-storybook --smoke-test"
7677
},
7778
"files": [
7879
"dist",

src/components/card/__tests__/__snapshots__/Card.test.tsx.snap

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,16 @@ exports[`Card matches snapshot 1`] = `
148148
<p
149149
className="nhsuk-card__description"
150150
>
151-
Go to
151+
Go to
152+
152153
<a
153154
href="#"
154155
>
155156
111.nhs.uk
156157
</a>
157-
or
158+
159+
or
160+
158161
<a
159162
href="#"
160163
>

yarn.lock

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@
23462346
resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.0.tgz#7da1c0d44ff1c7eb660a36ec078ea61ba7eb42cb"
23472347
integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw==
23482348

2349-
"@types/cheerio@^0.22.22":
2349+
"@types/cheerio@*", "@types/cheerio@^0.22.22":
23502350
version "0.22.28"
23512351
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.28.tgz#90808aabb44fec40fa2950f4c72351e3e4eb065b"
23522352
integrity sha512-ehUMGSW5IeDxJjbru4awKYMlKGmo1wSSGUVqXtYwlgmUM8X1a0PZttEIm6yEY7vHsY/hh6iPnklF213G0UColw==
@@ -2365,6 +2365,14 @@
23652365
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
23662366
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
23672367

2368+
"@types/enzyme@^3.10.8":
2369+
version "3.10.8"
2370+
resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.8.tgz#ad7ac9d3af3de6fd0673773123fafbc63db50d42"
2371+
integrity sha512-vlOuzqsTHxog6PV79+tvOHFb6hq4QZKMq1lLD9MaWD1oec2lHTKndn76XOpSwCA0oFTaIbKVPrgM3k78Jjd16g==
2372+
dependencies:
2373+
"@types/cheerio" "*"
2374+
"@types/react" "*"
2375+
23682376
"@types/estree@*":
23692377
version "0.0.47"
23702378
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.47.tgz#d7a51db20f0650efec24cd04994f523d93172ed4"

0 commit comments

Comments
 (0)