Comparing version 1.3.11 to 1.4.6-experimental
'use strict'; | ||
const uuid = require('uuid'); | ||
const UMF_VERSION = 'UMF/1.4.4'; | ||
const UMF_VERSION = 'UMF/1.4.5'; | ||
@@ -79,2 +79,5 @@ /** | ||
} | ||
if (this.message['timeout']) { | ||
message['tmo'] = this.message['timeout']; | ||
} | ||
if (this.message['timestamp']) { | ||
@@ -148,2 +151,5 @@ message['ts'] = this.message['timestamp']; | ||
} | ||
if (message.timeout || message.tmo) { | ||
proxy.timeout = message.timeout || message.tmo; | ||
} | ||
proxy.timestamp = message.timestamp || message.ts || proxy.getTimeStamp(); | ||
@@ -150,0 +156,0 @@ if (message.type || message.typ) { |
{ | ||
"name": "hydra", | ||
"version": "1.3.11", | ||
"version": "1.4.6-experimental", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Carlos Justiniano", |
@@ -84,3 +84,3 @@ /* eslint no-invalid-this: 0 */ | ||
expect(err).to.not.be.null; | ||
expect(err.message).to.equal('Config missing hydra branch'); | ||
expect(err.message).to.equal('Config missing serviceName or servicePort'); | ||
done(); | ||
@@ -91,5 +91,24 @@ }); | ||
/** | ||
* @description Hydra should fail to load without a hydra.redis branch in configuration | ||
* @description Hydra should load if serviceName and servicePort is provided | ||
*/ | ||
it('should fail without config hydra.redis branch', (done) => { | ||
it('should load if serviceName and servicePort is provided', (done) => { | ||
hydra.init({ | ||
hydra: { | ||
serviceName: 'test-service', | ||
servicePort: 3000 | ||
} | ||
}, true) | ||
.then(() => { | ||
done(); | ||
}) | ||
.catch((err) => { | ||
expect(err).to.be.null; | ||
done(); | ||
}); | ||
}); | ||
/** | ||
* @description Hydra should load without a hydra.redis branch in configuration | ||
*/ | ||
it('should load without config hydra.redis branch', (done) => { | ||
let config = getConfig(); | ||
@@ -99,8 +118,6 @@ delete config.hydra.redis; | ||
.then(() => { | ||
expect(true).to.be.false; | ||
done(); | ||
}) | ||
.catch((err) => { | ||
expect(err).to.not.be.null; | ||
expect(err.message).to.equal('Config missing hydra.redis branch'); | ||
expect(err).to.be.null; | ||
done(); | ||
@@ -107,0 +124,0 @@ }); |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
239353
3403
1
9