Skip to content

Commit 80adc1b

Browse files
chore(codemod): pick up codemods test by npm test
From now the `npm test` command will execute the codemod tests as well.
1 parent 980f30f commit 80adc1b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

codemods/jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = {}
1+
module.exports = {
2+
testMatch: ['<rootDir>/**/*.test.js'],
3+
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@
2626
],
2727
"scripts": {
2828
"test": "is-ci \"test:ci\" \"test:dev\"",
29-
"test:dev": "npm run test:types && npm run test:format && npm run test:eslint && jest --watch",
30-
"test:ci": "npm run test:types && npm run test:format && npm run test:eslint && jest",
29+
"test:dev": "npm run test:types && npm run test:format && npm run test:eslint && npm run test:codemod && jest --watch",
30+
"test:ci": "npm run test:types && npm run test:format && npm run test:eslint && npm run test:codemod && jest",
3131
"test:coverage": "yarn test:ci; open coverage/lcov-report/index.html",
3232
"test:format": "yarn prettier --check",
3333
"test:types": "tsc",
3434
"test:eslint": "eslint --ext .ts,.tsx ./src",
3535
"test:size": "yarn build:umd && bundlewatch",
36+
"test:codemod": "jest --config codemods/jest.config.js",
3637
"build": "yarn build:commonjs && yarn build:es && yarn build:umd && yarn build:types",
3738
"build:commonjs": "rimraf ./lib && cross-env BABEL_ENV=commonjs babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib",
3839
"build:es": "rimraf ./es && babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir es",

0 commit comments

Comments
 (0)