@efox/webpush
Version:
webpush sdk
34 lines (32 loc) • 649 B
Markdown
## 配置ts jest
* 1 npm install --save-dev jest ts-jest /jest
* 2 Modify your project's package.json
```
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
```
jest ts: https://github.com/kulshekhar/ts-jest
## test用例
```
/root/__test__
文件名: xxx.test.ts
执行: npm run test -> jest --verbose --colors --bail
```
## 发布
```
npm adduser 输入账号密码
更新package.json的版本
npm publish --access public
```