Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinicius de Lacerda committed Jun 6, 2024
1 parent 8c68cef commit d750ed2
Showing 1 changed file with 91 additions and 31 deletions.
122 changes: 91 additions & 31 deletions packages/lib/src/integrations/__fixtures__/dataFile.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,98 @@
export default {
accountId: '12345',
anonymizeIP: false,
botFiltering: false,
projectId: '23456',
revision: '6',
attributes: [
{id: 'trafficSource', key: 'trafficSource'},
{id: 'hasDefaultDates', key: 'hasDefaultDates'},
{id: 'deviceType', key: 'deviceType'}
],
audiences: [
{
id: 'foo-default-dates',
name: 'Foo Traffic',
conditions:
'[ "and", { "name": "trafficSource", "value": "foo", "type": "custom_attribute" }, { "name": "hasDefaultDates", "value": true, "type": "custom_attribute" }, ["not", { "name": "deviceType", "value": "mobile", "type": "custom_attribute" } ] ]'
}
],
version: '4',
events: [],
integrations: [],
anonymizeIP: false,
botFiltering: false,
typedAudiences: [],
variables: [],
environmentKey: 'production',
sdkKey: '12345',
featureFlags: [
{
experimentIds: ['foo'],
id: 'foo',
rolloutId: 'rollout-1234',
key: 'foo',
variables: []
},
{
experimentIds: ['bar'],
id: 'bar',
rolloutId: 'rollout-456',
key: 'bar',
variables: []
}
],
rollouts: [
{
id: 'rollout-1234',
experiments: [
{
id: '12345',
key: 'foo-exp',
status: 'Running',
layerId: '1234',
variations: [
{
id: '12345',
key: 'on',
featureEnabled: true,
variables: []
}
],
trafficAllocation: [
{
entityId: '12345',
endOfRange: 5000
}
],
forcedVariations: {},
audienceIds: [],
audienceConditions: []
},
{
id: 'default-foo',
key: 'default-foo',
status: 'Running',
layerId: 'default-foo',
variations: [
{
id: '624542',
key: 'off',
featureEnabled: false,
variables: []
}
],
trafficAllocation: [
{
entityId: '624542',
endOfRange: 10000
}
],
forcedVariations: {},
audienceIds: [],
audienceConditions: []
}
]
}
],
experiments: [
{
id: 'foo',
Expand Down Expand Up @@ -67,33 +155,5 @@ export default {
forcedVariations: []
}
],
featureFlags: [
{
experimentIds: ['foo'],
id: 'foo',
key: 'foo'
},
{
experimentIds: ['bar'],
id: 'bar',
key: 'bar'
}
],
events: [],
audiences: [
{
id: 'foo-default-dates',
name: 'Foo Traffic',
conditions:
'[ "and", { "name": "trafficSource", "value": "foo", "type": "custom_attribute" }, { "name": "hasDefaultDates", "value": true, "type": "custom_attribute" }, ["not", { "name": "deviceType", "value": "mobile", "type": "custom_attribute" } ] ]'
}
],
attributes: [
{id: 'trafficSource', key: 'trafficSource'},
{id: 'hasDefaultDates', key: 'hasDefaultDates'},
{id: 'deviceType', key: 'deviceType'}
],
groups: [],
rollouts: [],
variables: []
groups: []
}

0 comments on commit d750ed2

Please sign in to comment.