-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pass redis string as opts into queue
- Loading branch information
1 parent
4d197e8
commit 7787662
Showing
3 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,6 +206,23 @@ describe('Queue', () => { | |
return queue.close(); | ||
}); | ||
|
||
it('creates a queue using the supplied redis url as opts', () => { | ||
const queue = new Queue('custom', { | ||
redis: 'redis://abc:[email protected]:1234/1' | ||
}); | ||
|
||
expect(queue.client.options.host).to.be.eql('127.2.3.4'); | ||
expect(queue.eclient.options.host).to.be.eql('127.2.3.4'); | ||
|
||
expect(queue.client.options.port).to.be.eql(1234); | ||
expect(queue.eclient.options.port).to.be.eql(1234); | ||
|
||
expect(queue.client.options.db).to.be.eql(1); | ||
expect(queue.eclient.options.db).to.be.eql(1); | ||
|
||
return queue.close(); | ||
}); | ||
|
||
it('creates a queue using the supplied redis host', () => { | ||
const queue = new Queue('custom', { redis: { host: 'localhost' } }); | ||
|
||
|