From 9c2722e47f1e2ef4191f181d81afbe3e8a59c722 Mon Sep 17 00:00:00 2001 From: DudaGod Date: Fri, 11 Aug 2017 08:19:11 +0300 Subject: [PATCH 1/3] feat: use async emiter from gemini-core instead qemitter --- package.json | 2 +- test/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8e5ea56..f7af718 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "chai-as-promised": "^6.0.0", "eslint": "^3.11.1", "eslint-config-gemini-testing": "^2.4.0", + "gemini-core": "gemini-testing/gemini-core#feature/emitters", "mocha": "^3.2.0", - "qemitter": "^1.1.0", "sinon": "^1.17.6" } } diff --git a/test/utils.js b/test/utils.js index 8d0375c..3da4ae1 100644 --- a/test/utils.js +++ b/test/utils.js @@ -1,9 +1,9 @@ 'use strict'; -const QEmitter = require('qemitter'); +const AsyncEmitter = require('gemini-core').AsyncEmitter; exports.initTool = (events, config) => { - const tool = new QEmitter(); + const tool = new AsyncEmitter(); tool.events = events; tool.config = config; From 66c4fbfea8dbcb96bcc7866625970c0478c4b1b3 Mon Sep 17 00:00:00 2001 From: DudaGod Date: Fri, 11 Aug 2017 08:21:50 +0300 Subject: [PATCH 2/3] chore: use ssh-tun with added bluebird --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7af718..45d3866 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "homepage": "https://github.com/gemini-testing/ssh-tunneler#readme", "dependencies": { "lodash": "^4.17.2", - "ssh-tun": "^1.3.0", + "ssh-tun": "gemini-testing/ssh-tun#feat/bluebird", "urijs": "^1.18.4" }, "devDependencies": { From 06aa04608b21ebe09962d45c0744b2f029f651f5 Mon Sep 17 00:00:00 2001 From: DudaGod Date: Fri, 11 Aug 2017 08:29:38 +0300 Subject: [PATCH 3/3] fix: tests --- test/lib/url-decorator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lib/url-decorator.js b/test/lib/url-decorator.js index 85bab08..7b06a96 100644 --- a/test/lib/url-decorator.js +++ b/test/lib/url-decorator.js @@ -8,13 +8,13 @@ describe('url-decorator', () => { const tunnel = (opts) => _.defaults(opts || {}, {host: 'localhost', port: 8080}); it('should not redefine protocol by default', () => { - const decoratedUri = decorator.create()('https://', tunnel()); + const decoratedUri = decorator.create()('https://host', tunnel()); assert.equal(urijs(decoratedUri).protocol(), 'https'); }); it('should use protocol which is specified in options', () => { - const decoratedUri = decorator.create({protocol: 'https'})('http://', tunnel()); + const decoratedUri = decorator.create({protocol: 'https'})('http://host', tunnel()); assert.equal(urijs(decoratedUri).protocol(), 'https'); }); @@ -43,7 +43,7 @@ describe('url-decorator', () => { it('should apply protocol from options before custom url decorator', () => { const urlDecorator = sinon.stub(); - decorator.create({urlDecorator, protocol: 'https'})('http://', tunnel()); + decorator.create({urlDecorator, protocol: 'https'})('http://host', tunnel()); assert.calledWith(urlDecorator, sinon.match(/^https:\/\//)); });