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

restore mac test

上级 10029046
......@@ -27,14 +27,11 @@
"lint:sh": "bash -n bin/*.sh",
"sloc": "sloc bin examples scripts src tests --details --format cli-table --keys total,source,comment && sloc bin examples scripts src tests",
"ts-node": "ts-node",
"test": "npm run test:linux",
"test:linux": "npm run test:shell && npm run test:mac",
"test:mac": "npm run lint && npm run test:unit && npm run sloc",
"test": "npm run lint && npm run test:unit && npm run test:shell && npm run sloc",
"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",
"test:win32": "npm run test:unit:retry",
"test:debug": "blue-tape -r ts-node/register src/puppet-web/bridge.spec.ts",
"typedoc": "bash scripts/typedoc.sh",
"io-client": "ts-node bin/io-client",
......@@ -79,7 +76,7 @@
},
"dependencies": {
"array-flatten": "^2.1.1",
"brolog": "^1.6.3",
"brolog": "^1.8.1",
"clone-class": "^0.6.11",
"cuid": "^2.1.1",
"express": "^4.16.3",
......
......@@ -5,7 +5,7 @@ set -e
# brew cleanup
# brew cask cleanup
# brew install \
# moreutils \
# jq
# shellcheck
brew install \
moreutils \
jq
shellcheck
......@@ -198,15 +198,15 @@ export class Contact extends Accessory implements Sayable {
const contactIdList: string[] = await this.puppet.contactSearch(query)
const contactList = contactIdList.map(id => this.load(id))
const CHUNK_SIZE = 16
const BATCH_SIZE = 16
let batchIndex = 0
const invalidContactId: string[] = []
while (batchIndex * CHUNK_SIZE < contactList.length) {
while (batchIndex * BATCH_SIZE < contactList.length) {
const batchContactList = contactList.slice(
CHUNK_SIZE * batchIndex,
CHUNK_SIZE * (batchIndex + 1),
BATCH_SIZE * batchIndex,
BATCH_SIZE * (batchIndex + 1),
)
await Promise.all(
batchContactList.map(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册