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 29 forks source link

Remove unused testScope variables #17

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

I don't think this testScope is being used any longer.

If we go down the route of specifying the unit with deterministic assignment, we can specify the unit per test there. And really, most tests are user-based, anyway.

I'm not missing anything here, am I @allmywant? Removing this feature allowed all tests to pass fine. The only use for it seems to be in the function for setting the user ID cookie with this.options.testScope:

            _getEndUserId: function()
            {
                var val = Cookies.get('mojitoEndUserId');

                if (!val)
                {
                    val = "mjt" + (new Date).getTime() + "r" + Math.random();
                    Cookies.set('mojitoEndUserId', val, null, this.options.testScope, this.options.options.cookieDomain)
                }

                return val;
            },
allmywant commented 4 years ago

You're right @kingo55 , the changes looking good.