Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c3c8c8

Browse files
committed
strict smoke testing
1 parent 219df5d commit 7c3c8c8

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![Docker Pulls](https://img.shields.io/docker/pulls/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/)
55
[![Docker Stars](https://img.shields.io/docker/stars/zixia/wechaty.svg?maxAge=2592000)](https://hub.docker.com/r/zixia/wechaty/)
66
[![Docker Layers](https://images.microbadger.com/badges/image/zixia/wechaty.svg)](https://microbadger.com/#/images/zixia/wechaty)
7+
[![Build Status](https://travis-ci.com/Chatie/docker-wechaty-getting-started.svg?branch=master)](https://travis-ci.com/Chatie/docker-wechaty-getting-started)
78

89
[![dockeri.co](http://dockeri.co/image/zixia/wechaty)](https://hub.docker.com/r/zixia/wechaty/)
910

tests/fixtures/javascript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Wechaty } from 'wechaty'
22
const bot = new Wechaty()
33
bot.on('scan', qrcode => {
44
console.log(qrcode)
5+
console.log('SMOKE TESTING PASSED')
56
process.exit(0)
67
})
78
bot.start()

tests/fixtures/typescript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Wechaty } from 'wechaty'
22
const bot: Wechaty = new Wechaty()
33
bot.on('scan', (qrcode: string) => {
44
console.log(qrcode)
5+
console.log('SMOKE TESTING PASSED')
56
process.exit(0)
67
})
78
bot.start()

tests/smoke-testing.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ fixtures=tests/fixtures
1414
run dockerRun javascript.js
1515

1616
[ "$status" -eq 0 ]
17-
[[ $output =~ "https://login.weixin.qq.com/" ]]
17+
[[ $output =~ "SMOKE TESTING PASSED" ]]
1818
}
1919

2020
@test "should succ with typescript" {
2121
cd "$fixtures"
2222
run dockerRun typescript.ts
2323

2424
[ "$status" -eq 0 ]
25-
[[ $output =~ "https://login.weixin.qq.com/" ]]
25+
[[ $output =~ "SMOKE TESTING PASSED" ]]
2626
}

0 commit comments

Comments
 (0)