Skip to content

Commit 3fd9d22

Browse files
Merge pull request #1 from howdyai/master
Update from origin
2 parents b4bbee7 + e705125 commit 3fd9d22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1147
-136
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ examples/db_team_bot/
1010
*/.DS_Store
1111
.env
1212
.idea
13-
.vscode/settings.json
13+
.vscode
14+
coverage

.vscode/launch.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ possible with your report. If you can, please include:
2424
* Create, or link to an existing issue identifying the need driving your PR request. The issue can contain more details of the need for the PR as well as host debate as to which course of action the PR will take that will most serve the common good.
2525
* Include screenshots and animated GIFs in your pull request whenever possible.
2626
* Follow the JavaScript coding style with details from `.jscsrc` and `.editorconfig` files and use necessary plugins for your text editor.
27+
* Run `npm test` before submitting and fix any issues.
28+
* Add tests to cover any new functionality. Add and/or update tests for any updates to the code.
2729
* Write documentation in [Markdown](https://daringfireball.net/projects/markdown).
2830
* Please follow, [JSDoc](http://usejsdoc.org/) for proper documentation.
2931
* Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages).

__test__/lib/Botkit.test.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict';
2+
3+
let botkit;
4+
5+
jest.mock('../../lib/CoreBot', () => 'corebot');
6+
jest.mock('../../lib/SlackBot', () => 'slackbot');
7+
jest.mock('../../lib/Facebook', () => 'facebook');
8+
jest.mock('../../lib/TwilioIPMBot', () => 'twilioipm');
9+
jest.mock('../../lib/TwilioSMSBot', () => 'twiliosms');
10+
jest.mock('../../lib/BotFramework', () => 'botframework');
11+
jest.mock('../../lib/CiscoSparkbot', () => 'spark');
12+
jest.mock('../../lib/ConsoleBot', () => 'console');
13+
14+
beforeEach(() => {
15+
jest.clearAllMocks();
16+
botkit = require('../../lib/Botkit');
17+
});
18+
19+
test('exports bot interfaces', () => {
20+
expect(botkit.core).toBe('corebot');
21+
expect(botkit.slackbot).toBe('slackbot');
22+
expect(botkit.facebookbot).toBe('facebook');
23+
expect(botkit.twilioipmbot).toBe('twilioipm');
24+
expect(botkit.twiliosmsbot).toBe('twiliosms');
25+
expect(botkit.botframeworkbot).toBe('botframework');
26+
expect(botkit.sparkbot).toBe('spark');
27+
expect(botkit.consolebot).toBe('console');
28+
});

0 commit comments

Comments
 (0)