-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ad ids, and copy appropriate session properties from person prope…
…rties
- Loading branch information
Showing
2 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { CORE_FILTER_DEFINITIONS_BY_GROUP, SESSION_PROPERTIES_ADAPTED_FROM_PERSON } from 'lib/taxonomy' | ||
|
||
import { CoreFilterDefinition } from '~/types' | ||
|
||
describe('taxonomy', () => { | ||
describe('person properties', () => { | ||
// check that initial properties have been set up correctly | ||
it('should have an $initial_referring_domain property', () => { | ||
const property: CoreFilterDefinition = | ||
CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties['$initial_referring_domain'] | ||
expect(property.label).toEqual('Initial Referring Domain') | ||
}) | ||
}) | ||
describe('event properties', () => { | ||
const sessionPropertyNames = Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.sessions) | ||
it('should have an $initial_referring_domain property', () => { | ||
const property: CoreFilterDefinition = | ||
CORE_FILTER_DEFINITIONS_BY_GROUP.sessions['$initial_referring_domain'] | ||
expect(property.label).toEqual('Initial Referring Domain') | ||
}) | ||
it(`should have every property in SESSION_PROPERTIES_ADAPTED_FROM_PERSON`, () => { | ||
for (const property of Array.from(SESSION_PROPERTIES_ADAPTED_FROM_PERSON.keys())) { | ||
expect(sessionPropertyNames).toContain(property) | ||
} | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters