ensure objects are event emitters

This commit is contained in:
2016-04-15 17:29:40 -07:00
parent 9f495c7791
commit 5ce288fd72
2 changed files with 14 additions and 2 deletions

View File

@@ -1,7 +1,13 @@
import Elastique from '../../lib/index';
import events from 'events';
import expect from 'expect.js';
import Elastique from '../../lib/index';
describe('Elastique class', function () {
it('should be an event emitter', function () {
const queue = new Elastique('elastique');
expect(queue).to.be.an(events.EventEmitter);
});
describe('Option validation', function () {
it('should throw without an index', function () {
const init = () => new Elastique();