Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Kuzzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ function Kuzzle (host, options, cb) {
},
writable: true
},
// read-only properties
// configuration properties
autoReconnect: {
value: (options && typeof options.autoReconnect === 'boolean') ? options.autoReconnect : true,
writable: true,
enumerable: true
},
defaultIndex: {
Expand All @@ -107,6 +108,7 @@ function Kuzzle (host, options, cb) {
},
reconnectionDelay: {
value: (options && typeof options.reconnectionDelay === 'number') ? options.reconnectionDelay : 1000,
writable: true,
enumerable: true
},
host: {
Expand All @@ -121,6 +123,7 @@ function Kuzzle (host, options, cb) {
},
sslConnection: {
value: (options && typeof options.sslConnection === 'boolean') ? options.sslConnection : false,
writable: true,
enumerable: true
},
autoQueue: {
Expand Down
6 changes: 3 additions & 3 deletions test/kuzzle/constructor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Kuzzle constructor', function () {
var kuzzle = new Kuzzle('nowhere');

should(kuzzle).have.propertyWithDescriptor('autoQueue', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('autoReconnect', { enumerable: true, writable: false, configurable: false });
should(kuzzle).have.propertyWithDescriptor('autoReconnect', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('autoReplay', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('autoResubscribe', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('defaultIndex', { enumerable: true, writable: true, configurable: false });
Expand All @@ -67,11 +67,11 @@ describe('Kuzzle constructor', function () {
should(kuzzle).have.propertyWithDescriptor('headers', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('metadata', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('replayInterval', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('reconnectionDelay', { enumerable: true, writable: false, configurable: false });
should(kuzzle).have.propertyWithDescriptor('reconnectionDelay', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('jwtToken', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('offlineQueueLoader', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('port', { enumerable: true, writable: true, configurable: false });
should(kuzzle).have.propertyWithDescriptor('sslConnection', { enumerable: true, writable: false, configurable: false });
should(kuzzle).have.propertyWithDescriptor('sslConnection', { enumerable: true, writable: true, configurable: false });
});

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