Skip to content

Commit 0d93635

Browse files
committed
improvement: now compiling TypeScript on yarn test
This should prevent type errors from slipping in.
1 parent 2664df0 commit 0d93635

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/with-typescript/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"pretest": "relative-deps",
1111
"start": "react-scripts start",
1212
"build": "react-scripts build",
13-
"test": "react-scripts test",
13+
"test": "react-scripts test && test:typescript",
14+
"test:typescript": "tsc --version && tsc --noEmit",
1415
"now-build": "SKIP_PREFLIGHT_CHECK=true react-scripts build"
1516
},
1617
"dependencies": {

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
"test:compat": "yarn test:backwards && yarn test:forwards && yarn test:latest",
2727
"test:examples": "CI=1 lerna run --scope '*-example' test -- --passWithNoTests --watchAll=false",
2828
"test:chromatic": "chromatic --app-code iiua39bmt0j --build-script-name build:storybook --exit-zero-on-changes",
29+
"test:typescript": "tsc --version && tsc --noEmit --project packages/react-async",
2930
"resolutions:fix-react": "jq '.resolutions.react = .devDependencies.react|.resolutions.\"react-dom\"=.devDependencies.react' package.json > package.json.new && mv package.json.new package.json && yarn install",
30-
"ci": "yarn lint && yarn test:compat && yarn test:examples",
31+
"ci": "yarn lint && yarn test:typescript && yarn test && yarn test:compat && yarn test:examples",
3132
"build:packages": "lerna run --scope 'react-async*' build",
3233
"build:examples": "lerna run --scope '*-example' build",
3334
"build:storybook": "build-storybook -o storybook",

0 commit comments

Comments
 (0)