mint-metrics / mojito-js-delivery

🧪 Source-controlled JS split testing framework for building and launching A/B tests.
https://mojito.mx/docs/js-delivery-intro
Other
16 stars 30 forks source link

Move default testObject state to extend() function at start of constructor #70

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

Consider this default to 'staging' protection we built in a while back:

https://github.com/kingo55/mojito-js-delivery/blob/9f313bd1ba59f1f8dcb80cc4df41b6b02b08f28c/lib/mojito.js#L75-L77

Wouldn't this be better placed in the object extension here?:

            this.options = Utils.extend({
                id: null,
                name: null,
                recipes: null,
                sampleRate: 1.0,
                storageAdapter: null,
                decisionAdapter: null,
                trigger: null
            }, options);
kingo55 commented 4 years ago

addressed by #77