Skip to content

Commit

Permalink
Add test for version behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzokuken committed Oct 18, 2017
1 parent ab2c40f commit afedfb2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/version-spec.js
@@ -0,0 +1,16 @@
const Behaviors = require('../src/behaviors');

describe('Version Behavior', () => {
const botNick = 'testbot';
const versionBehavior = require('../src/behaviors/version');
const behaviors = new Behaviors(botNick, undefined, [], [versionBehavior]);

const versionResponse = `testbot is running package ${process.env.npm_package_name} at version ${process.env.npm_package_version}`;

it('should print information correctly', (done) => {
behaviors.getResponse(botNick, 'version').then(response => {
expect(response).toBe(versionResponse);
done();
});
});
});

0 comments on commit afedfb2

Please sign in to comment.