Skip to content

Commit

Permalink
Merge pull request #7 from crookedneighbor/slack_wrapper
Browse files Browse the repository at this point in the history
Slack wrapper
  • Loading branch information
crookedneighbor committed Dec 17, 2015
2 parents 7d7a926 + ebab20e commit d639bea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/haxfred-slack.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let Slack = require('slack-client')
let Slack = require('./slack-wrapper')

import onOpen from './onOpen'
import onMessage from './onMessage'
Expand Down
9 changes: 9 additions & 0 deletions src/slack-wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import SlackClient from 'slack-client'

class SlackWrapper extends SlackClient {
constructor (...args) {
super(...args)
}
}

module.exports = SlackWrapper
12 changes: 12 additions & 0 deletions test/slack-wrapper.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import SlackClient from 'slack-client'
import SlackWrapper from '../src/slack-wrapper'

describe('Slack Wrapper', () => {
describe('initialization', () => {
it('is an instance of slack-client', () => {
let slackInstance = new SlackWrapper()

expect(slackInstance).to.be.an.instanceOf(SlackClient)
})
})
})

0 comments on commit d639bea

Please sign in to comment.