Skip to content

Commit

Permalink
feat(test): Start server return object
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoDanin committed Feb 9, 2020
1 parent a6c9f44 commit 7e2029a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const bot = new Telegraf('ABCD:1234567890')
const test = new TelegrafTest({
url: `http://127.0.0.1:${port}/${secretPath}`
})
test.startServer()

const express = test.startServer()

bot.hears(/ping/i, ctx => {
ctx.reply('Pong!')
Expand Down Expand Up @@ -187,4 +188,8 @@ describe('Telegraf Test', () => {
it('send request / via POST', async () => {
await axios.post('http://127.0.0.1:2000/')
})

it('Has express object of Start Server', async () => {
assert.strictEqual(typeof express === 'object', true)
})
})

0 comments on commit 7e2029a

Please sign in to comment.