зеркало из https://github.com/mozilla/fxa-shared.git
fix(metrics): Add an entry to EVENT_PROPERTIES for `notify` group.
I missed this yesterday.
This commit is contained in:
Родитель
7d74452538
Коммит
420fcdcc99
|
@ -44,6 +44,7 @@ const EVENT_PROPERTIES = {
|
|||
[GROUPS.email]: mapEmailType,
|
||||
[GROUPS.emailFirst]: NOP,
|
||||
[GROUPS.login]: NOP,
|
||||
[GROUPS.notify]: NOP,
|
||||
[GROUPS.registration]: NOP,
|
||||
[GROUPS.settings]: mapDisconnectReason,
|
||||
[GROUPS.sms]: NOP
|
||||
|
@ -93,6 +94,7 @@ function mapDisconnectReason (eventType, eventCategory) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
EVENT_PROPERTIES,
|
||||
GROUPS,
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,6 +30,13 @@ describe('metrics/amplitude:', () => {
|
|||
assert.isString(amplitude.GROUPS.sms);
|
||||
});
|
||||
|
||||
it('has an EVENT_PROPERTIES entry for each group', () => {
|
||||
for (const group of Object.keys(amplitude.GROUPS)) {
|
||||
const groupName = amplitude.GROUPS[group];
|
||||
assert.isFunction(amplitude.EVENT_PROPERTIES[groupName], group);
|
||||
}
|
||||
});
|
||||
|
||||
it('exports an initialize method', () => {
|
||||
assert.isFunction(amplitude.initialize);
|
||||
assert.lengthOf(amplitude.initialize, 3);
|
||||
|
|
Загрузка…
Ссылка в новой задаче