Skip to content

Commit

Permalink
fix: Export a default object from root module.
Browse files Browse the repository at this point in the history
Fix #51.
  • Loading branch information
Jason Walton committed Sep 13, 2018
1 parent ab7e8e0 commit 78893c9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
28 changes: 7 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ import AmqpConnectionManager from './AmqpConnectionManager';

export function connect(urls, options) {
return new AmqpConnectionManager(urls, options);
}
}

const amqp = {
connect
};

export default amqp;
9 changes: 9 additions & 0 deletions test/importTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { expect } from 'chai';
import amqp from '../src';

describe('import test', function() {
it('should let you import as default', function() {
expect(amqp).to.exist;
expect(amqp.connect).to.exist;
});
});

0 comments on commit 78893c9

Please sign in to comment.