#40 fix typescript unit tests with ava
Showing
... | ... | @@ -16,19 +16,20 @@ |
}, | ||
"scripts": { | ||
"ts-node": "ts-node", | ||
"build": "tsc", | ||
"build": "tsc && cp package.json dist/ && cp src/puppet-web/*.js dist/src/puppet-web/", | ||
"doctor": "ts-node bin/doctor", | ||
"clean": "rm -fr dist/*", | ||
"lint": "npm run eslint && npm run tslint", | ||
"eslint": "eslint \"{bin,example,src,test}/**/*.js\"", | ||
"tslint": "tslint \"{bin,example,src,test}/**/*.ts\" && tsc --noEmit", | ||
"sloc": "sloc . --details --format cli-table --keys total,source,comment --exclude \"node_modules|doc\" && sloc . --exclude \"node_modules|doc\"", | ||
"pretest": "npm run lint", | ||
"pretest": "npm run lint && npm run clean && npm run build", | ||
"test": "npm run test:phantomjs && npm run test:chrome", | ||
"posttest": "npm run sloc", | ||
"test:phantomjs": "cross-env LC_ALL=C WECHATY_LOG=info WECHATY_HEAD=phantomjs node_modules/.bin/ava --timeout=10m \"{src,test}/**/*.spec.js\"", | ||
"test:chrome": "cross-env LC_ALL=C WECHATY_LOG=silly WECHATY_HEAD=chrome node_modules/.bin/ava --timeout=10m \"{src,test}/**/*.spec.js\"", | ||
"posttest": "npm run clean && npm run sloc", | ||
"test:phantomjs": "cross-env LC_ALL=C WECHATY_LOG=info WECHATY_HEAD=phantomjs ava --timeout=10m \"dist/{src,test}/**/*.spec.js\"", | ||
"test:chrome": "cross-env LC_ALL=C WECHATY_LOG=silly WECHATY_HEAD=chrome ava --timeout=10m \"dist/{src,test}/**/*.spec.js\"", | ||
"testdev": "cross-env LC_ALL=C WECHATY_LOG=silly ava --ext ts --serial --verbose --fail-fast --timeout=3m", | ||
"testdist": "ava --verbose --fail-fast --timeout=3m", | ||
"ava": "cross-env LC_ALL=C WECHATY_LOG=verbose ts-node node_modules/.bin/ava \"{src,test}/**/*.spec.js\"", | ||
"start": "ts-node bin/client", | ||
"dev": "ts-node dev.ts", | ||
... | ... | @@ -85,6 +86,7 @@ |
}, | ||
"dependencies": { | ||
"arrify": "^1.0.1", | ||
"ava": "^0.16.0", | ||
"body-parser": "^1.15.2", | ||
"brolog": "^0.3.10", | ||
"chromedriver": "^2.23.1", | ||
... | ... |
想要评论请 注册 或 登录