From 5e57c183b1249535078f0092544e8508c4b3a215 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Tue, 23 May 2017 16:36:33 +0800 Subject: [PATCH] clean(code): clean warnings --- .travis.yml | 2 +- package.json | 2 +- test/puppet-web/browser.spec.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 64727080..e2f267f7 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 093c1a9c..ac229e01 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 3cb5627f..5af48c99 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, -- GitLab