diff --git a/.travis.yml b/.travis.yml index 647270807c3409980627067d26483fb1077be040..e2f267f7317871f7dd2cda8d23334324d1a1761a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,7 @@ script: # - if [ "$TRAVIS_OS_NAME" == 'linux' ]; then WECHATY_LOG=silly npm run test:phantomjs; fi - if [ "$TRAVIS_OS_NAME" == 'linux' ]; then WECHATY_LOG=silly npm run test:chrome; fi - if [ "$TRAVIS_OS_NAME" == 'osx' ]; then WECHATY_LOG=verbose npm run nycava; fi - - npm run test:npm && echo 'Npm packing is passed the test and ready for publish' + - npm run test:npm && echo 'Npm packing test is passed' notifications: webhooks: diff --git a/package.json b/package.json index 093c1a9ca8fd7f5ca80b0bca0b10c55b5f688200..ac229e01c010371e74b48d96e6ae0fbe41060e33 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "testdev": "cross-env LC_ALL=C WECHATY_LOG=silly ava --ext ts --serial --verbose --fail-fast --timeout=2m", "testdist": "cross-env WECHATY_LOG=SILLY WECHATY_HEAD=chrome ava --ext ts --verbose --fail-fast --timeout=2m", "test:pack": "npm run dist && rm -fr package wechaty-*.*.*.tgz && npm pack --verbose && tar zxvf wechaty-*.*.*.tgz", - "test:npm": "export TMPDIR=/tmp/wechaty.$$ && npm pack && mkdir $TMPDIR && mv wechaty-*.*.*.tgz $TMPDIR && cp example/smoke-testing.js $TMPDIR && cd $TMPDIR && npm i wechaty-*.*.*.tgz && node smoke-testing.js", + "test:npm": "export TMPDIR=/tmp/wechaty.$$ && npm pack && mkdir $TMPDIR && mv wechaty-*.*.*.tgz $TMPDIR && cp example/smoke-testing.js $TMPDIR && cd $TMPDIR && npm init -y && npm i wechaty-*.*.*.tgz && node smoke-testing.js", "io-client": "ts-node bin/io-client", "dev": "ts-node dev.ts", "demo": "ts-node example/ding-dong-bot.ts", diff --git a/test/puppet-web/browser.spec.ts b/test/puppet-web/browser.spec.ts index 3cb5627fce74a860fe443fd85ca3bed0d3cbdb70..5af48c9958c66377be5b18f0e886885c2567089f 100644 --- a/test/puppet-web/browser.spec.ts +++ b/test/puppet-web/browser.spec.ts @@ -5,17 +5,17 @@ * https://github.com/wechaty/wechaty * */ -import * as fs from 'fs' +import * as fs from 'fs' import { test } from 'ava' import { Config, log, -} from '../../' +} from '../../' import { - Browser, -} from '../../src/puppet-web/' + Browser, +} from '../../src/puppet-web/' const PROFILE = Config.DEFAULT_PROFILE + '-' + process.pid + '-' let profileCounter = 1 @@ -88,7 +88,7 @@ test('Cookie smoking test', async t => { }) test('Cookie save/load', async t => { - const profileName = PROFILE + profileCounter++ + 'wechaty.json' + const profileName = PROFILE + (profileCounter++) let browser = new Browser({ head: Config.head,