fix(metrics): ensure deviceId falls back to `none` if not set
This commit is contained in:
Родитель
9fd5b6f087
Коммит
73485ab277
|
@ -350,7 +350,7 @@ define(function (require, exports, module) {
|
|||
const allData = _.extend({}, loadData, unloadData, {
|
||||
broker: this._brokerType,
|
||||
context: this._context,
|
||||
deviceId: flowData.deviceId,
|
||||
deviceId: flowData.deviceId || NOT_REPORTED_VALUE,
|
||||
emailDomain: this._emailDomain,
|
||||
entrypoint: this._entrypoint,
|
||||
experiments: flattenHashIntoArrayOfObjects(this._activeExperiments),
|
||||
|
|
|
@ -98,6 +98,10 @@ define(function (require, exports, module) {
|
|||
});
|
||||
});
|
||||
|
||||
it('deviceId defaults to NOT_REPORTED_VALUE', () => {
|
||||
assert.equal(metrics.getAllData().deviceId, 'none');
|
||||
});
|
||||
|
||||
describe('trigger flow.initialize event', () => {
|
||||
beforeEach(() => {
|
||||
notifier.trigger('flow.initialize');
|
||||
|
|
Загрузка…
Ссылка в новой задаче