提交 058848e7 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

add typing check when run pack testing

上级 5916b085
......@@ -30,7 +30,7 @@
"ts-node": "ts-node",
"test": "npm run clean && npm run lint && npm run test:unit:retry && npm run test:shell && npm run sloc",
"test:linux": "npm run pretest && parallel ts-node -- ./src/**/*.spec.ts ./tests/**/*.spec.ts && npm run posttest",
"test:pack": "npm run dist && export TMPDIR=/tmp/wechaty.$$ && npm pack && mkdir $TMPDIR && mv wechaty-*.*.*.tgz $TMPDIR && cp tests/fixtures/smoke-testing.js $TMPDIR && cd $TMPDIR && npm init -y && npm i wechaty-*.*.*.tgz && (for i in {1..3}; do node smoke-testing.js && break || sleep 1; done)",
"test:pack": "bash -x scripts/npm-pack-testing.sh",
"test:shell": "shellcheck bin/*.sh",
"test:unit": "blue-tape -r ts-node/register \"src/**/*.spec.ts\" \"src/*.spec.ts\" \"tests/*.spec.ts\" \"tests/**/*.spec.ts\"",
"test:unit:retry": "ts-node scripts/retry-unit-tests",
......
#!/usr/bin/env bash
set -e
npm run dist
npm pack
TMPDIR="/tmp/npm-pack-testing.$$"
mkdir "$TMPDIR"
mv *-*.*.*.tgz "$TMPDIR"
cp tests/fixtures/smoke-testing.ts "$TMPDIR"
cd $TMPDIR
npm init -y
npm install *-*.*.*.tgz \
rxjs \
brolog \
typescript@latest
./node_modules/.bin/tsc \
--lib esnext,dom \
--noEmitOnError \
--noImplicitAny \
--skipLibCheck \
smoke-testing.ts
node smoke-testing.js
# (for i in {1..3}; do node smoke-testing.js && break || sleep 1; done)
#!/usr/bin/env node
const { Wechaty } = require('wechaty')
import { Wechaty } from 'wechaty'
async function main() {
const bot = Wechaty.instance()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册