mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-21 04:59:15 +00:00
test pass
This commit is contained in:
@@ -6,8 +6,7 @@ const ProviderClass = require('./classes/provider.class')
|
||||
* @param {*} args
|
||||
* @returns
|
||||
*/
|
||||
const create = async ({ flow, database, provider }) => {
|
||||
const create = async ({ flow, database, provider }) =>
|
||||
new BotClass(flow, database, provider)
|
||||
}
|
||||
|
||||
module.exports = { create, ProviderClass }
|
||||
|
||||
@@ -2,6 +2,7 @@ const { EventEmitter } = require('node:events')
|
||||
const { test } = require('uvu')
|
||||
const assert = require('uvu/assert')
|
||||
const { create } = require('../')
|
||||
const BotClass = require('../classes/bot.class')
|
||||
|
||||
class MockFlow {}
|
||||
|
||||
@@ -16,7 +17,7 @@ test(`BotClass`, async () => {
|
||||
provider: new MockProvider(),
|
||||
}
|
||||
const bot = await create(setting)
|
||||
bot.on('message', (ctx) => console.log(ctx))
|
||||
assert.is(bot instanceof BotClass, true)
|
||||
})
|
||||
|
||||
test.run()
|
||||
|
||||
Reference in New Issue
Block a user