0.2.1 • Published 7 years ago

discunit.js v0.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

DiscUnit.js

Built With Love Code Style: Standard Discord.JS Gitter

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
)