Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ describe('Config Parsing and Generating', () => {

it('generates the correctly modified config from the example config', () => {
const user = {
country: 'canada',
country: 'CA',
user_id: 'asuh',
email: 'test',
}
Expand Down Expand Up @@ -326,7 +326,7 @@ describe('Config Parsing and Generating', () => {

it('puts the user in the target for the first audience they match', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -544,7 +544,7 @@ describe('Config Parsing and Generating', () => {

it('holds user back if not in rollout and passthrough disabled', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -625,7 +625,7 @@ describe('Config Parsing and Generating', () => {

it('pushes user to next target if not in rollout and passthrough not disabled', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -760,7 +760,7 @@ describe('Config Parsing and Generating', () => {

it('pushes user to next target if not in rollout and passthrough setting not defined', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -906,7 +906,7 @@ describe('Config Parsing and Generating', () => {

it('puts user through if in rollout', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1035,7 +1035,7 @@ describe('Config Parsing and Generating', () => {

it('errors when feature missing distribution', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
email: '[email protected]',
}
Expand All @@ -1056,7 +1056,7 @@ describe('Config Parsing and Generating', () => {

it('errors when config missing variations', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1088,7 +1088,7 @@ describe('Config Parsing and Generating', () => {

it('errors when config missing variables', () => {
const user = {
country: 'canada',
country: 'CA',
user_id: 'asuh',
email: '[email protected]',
}
Expand All @@ -1109,7 +1109,7 @@ describe('Config Parsing and Generating', () => {

it('puts the user in the target (customData !exists) with null Custom Data', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1182,7 +1182,7 @@ describe('Config Parsing and Generating', () => {

it('puts the user in the target (customData exists) for the first audience they match', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'asuh',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1256,7 +1256,7 @@ describe('Config Parsing and Generating', () => {
describe('overrides', () => {
it('overrides a bucketing decision as well as a feature that did not pass segmentation', () => {
const user = {
country: 'canada',
country: 'CA',
user_id: 'asuh',
email: 'test',
}
Expand Down Expand Up @@ -1715,7 +1715,7 @@ describe('bucketingKey tests', () => {

it('buckets a user with custom bucketingKey', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
customData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1758,7 +1758,7 @@ describe('bucketingKey tests', () => {

it('buckets a user with custom bucketingKey from privateCustomData', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
privateCustomData: {
favouriteFood: 'pizza',
Expand Down Expand Up @@ -1798,7 +1798,7 @@ describe('bucketingKey tests', () => {

it('buckets a user with custom number bucketingKey', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
privateCustomData: {
favouriteNumber: 610,
Expand Down Expand Up @@ -1836,7 +1836,7 @@ describe('bucketingKey tests', () => {

it('buckets a user with custom boolean bucketingKey', () => {
const user = {
country: 'U S AND A',
country: 'US',
user_id: 'pass_rollout',
privateCustomData: {
signed_up: true,
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/bucketing-test-data/src/data/testData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
type: FilterType.user,
subType: UserSubType.country,
comparator: FilterComparator['!='],
values: ['U S AND A'],
values: ['US'],
},
],
operator: AudienceOperator.and,
Expand All @@ -168,7 +168,7 @@
type: FilterType.user,
subType: UserSubType.country,
comparator: FilterComparator['!='],
values: ['U S AND A'],
values: ['US'],
},
],
operator: AudienceOperator.and,
Expand Down Expand Up @@ -540,7 +540,7 @@
} {
const auds: { [id: string]: Omit<PublicAudience<string>, '_id'> } = {}
audiences.forEach((aud: PublicAudience) => {
const { _id, ...rest } = aud

Check warning on line 543 in lib/shared/bucketing-test-data/src/data/testData.ts

View workflow job for this annotation

GitHub Actions / build (22.12)

'_id' is assigned a value but never used
auds[aud._id] = {
...rest,
}
Expand Down
Loading
Loading