0.2.1 • Published 7 years ago
discunit.js v0.2.1
DiscUnit.js
An API for unit testing with JavaScript Discord bots.
yarn add --dev discunit.js
Example
const test = require('discunit.js')
const config = require('./secretConfig')
// Initialize your bot...
test(
t => {
t.messageContentEqualTo('pong')
this.client.channels.get(this.channel).send('ping')
// Awaits a response of "pong"
},
'Ping test',
...config
)