Skip to content

Commit f47098e

Browse files
author
David Bengsch
authored
Merge pull request #188 from kuzzleio/ssl-support-for-back-office
Make all options given to kuzzle constructor writable
2 parents d5f82a5 + d749587 commit f47098e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Kuzzle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ function Kuzzle (host, options, cb) {
9595
},
9696
writable: true
9797
},
98-
// read-only properties
98+
// configuration properties
9999
autoReconnect: {
100100
value: (options && typeof options.autoReconnect === 'boolean') ? options.autoReconnect : true,
101+
writable: true,
101102
enumerable: true
102103
},
103104
defaultIndex: {
@@ -107,6 +108,7 @@ function Kuzzle (host, options, cb) {
107108
},
108109
reconnectionDelay: {
109110
value: (options && typeof options.reconnectionDelay === 'number') ? options.reconnectionDelay : 1000,
111+
writable: true,
110112
enumerable: true
111113
},
112114
host: {
@@ -121,6 +123,7 @@ function Kuzzle (host, options, cb) {
121123
},
122124
sslConnection: {
123125
value: (options && typeof options.sslConnection === 'boolean') ? options.sslConnection : false,
126+
writable: true,
124127
enumerable: true
125128
},
126129
autoQueue: {

test/kuzzle/constructor.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('Kuzzle constructor', function () {
5656
var kuzzle = new Kuzzle('nowhere');
5757

5858
should(kuzzle).have.propertyWithDescriptor('autoQueue', { enumerable: true, writable: true, configurable: false });
59-
should(kuzzle).have.propertyWithDescriptor('autoReconnect', { enumerable: true, writable: false, configurable: false });
59+
should(kuzzle).have.propertyWithDescriptor('autoReconnect', { enumerable: true, writable: true, configurable: false });
6060
should(kuzzle).have.propertyWithDescriptor('autoReplay', { enumerable: true, writable: true, configurable: false });
6161
should(kuzzle).have.propertyWithDescriptor('autoResubscribe', { enumerable: true, writable: true, configurable: false });
6262
should(kuzzle).have.propertyWithDescriptor('defaultIndex', { enumerable: true, writable: true, configurable: false });
@@ -67,11 +67,11 @@ describe('Kuzzle constructor', function () {
6767
should(kuzzle).have.propertyWithDescriptor('headers', { enumerable: true, writable: true, configurable: false });
6868
should(kuzzle).have.propertyWithDescriptor('metadata', { enumerable: true, writable: true, configurable: false });
6969
should(kuzzle).have.propertyWithDescriptor('replayInterval', { enumerable: true, writable: true, configurable: false });
70-
should(kuzzle).have.propertyWithDescriptor('reconnectionDelay', { enumerable: true, writable: false, configurable: false });
70+
should(kuzzle).have.propertyWithDescriptor('reconnectionDelay', { enumerable: true, writable: true, configurable: false });
7171
should(kuzzle).have.propertyWithDescriptor('jwtToken', { enumerable: true, writable: true, configurable: false });
7272
should(kuzzle).have.propertyWithDescriptor('offlineQueueLoader', { enumerable: true, writable: true, configurable: false });
7373
should(kuzzle).have.propertyWithDescriptor('port', { enumerable: true, writable: true, configurable: false });
74-
should(kuzzle).have.propertyWithDescriptor('sslConnection', { enumerable: true, writable: false, configurable: false });
74+
should(kuzzle).have.propertyWithDescriptor('sslConnection', { enumerable: true, writable: true, configurable: false });
7575
});
7676

7777
it('should have properties with the documented default values', function () {

0 commit comments

Comments
 (0)