Skip to content

Commit e7c5079

Browse files
chore(package): add script test:ci; update husky, travis, publish
`npm run test:ci` passes option `--ci` to `npm test`, which fails the test if a new snapshot is encountered.
1 parent 4c64bb3 commit e7c5079

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.huskyrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hooks": {
33
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4-
"pre-commit": "npm run lint:dts && npm test && lint-staged"
4+
"pre-commit": "npm run lint:dts && npm run test:ci && lint-staged"
55
}
66
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ script:
88
- npx commitlint --from=HEAD~1
99
- npm run lint
1010
- npm run lint:dts
11-
- npm test
11+
- npm run test:ci
1212
- npm run build
1313
- npm run benchmark
1414
after_success:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"lint": "eslint --ignore-path .gitignore --ignore-pattern /examples/ .",
1212
"lint:dts": "dtslint .",
1313
"lint:fix": "npm run lint -- --fix",
14-
"prepublishOnly": "npm run lint && npm run lint:dts && npm test && npm run clean && npm run build",
14+
"prepublishOnly": "npm run lint && npm run lint:dts && npm run test:ci && npm run clean && npm run build",
1515
"release": "standard-version --no-verify",
1616
"test": "jest --coverage",
17+
"test:ci": "npm test -- --ci",
1718
"test:watch": "npm test -- --watch"
1819
},
1920
"repository": {

0 commit comments

Comments
 (0)