Skip to content

Commit

Permalink
Update tests to check PLATFORM_ prefix manipulation.
Browse files Browse the repository at this point in the history
  • Loading branch information
goodov committed Oct 18, 2024
1 parent 413955c commit 35d7e4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/seed_tools/utils/study_json_utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ describe('stringifyStudies', () => {
]);
});

it('should convert channel values', () => {
it('should convert channel, platform values', () => {
const study = Study.fromJson(
{
name: 'study',
filter: {
channel: ['CANARY', 'BETA', 'STABLE'],
platform: ['PLATFORM_LINUX', 'PLATFORM_MAC'],
},
},
{ ignoreUnknownFields: false },
Expand All @@ -55,6 +56,7 @@ describe('stringifyStudies', () => {
name: 'study',
filter: {
channel: ['NIGHTLY', 'BETA', 'RELEASE'],
platform: ['LINUX', 'MAC'],
},
},
]);
Expand Down Expand Up @@ -102,14 +104,15 @@ describe('stringifyStudies', () => {
]);
});

it('chromium mode should keep channel values', () => {
it('chromium mode should not modify channel, platform values', () => {
const startDate = new Date('2022-01-01T00:00:00Z');
const study = Study.fromJson(
{
name: 'study',
filter: {
start_date: Math.floor(startDate.getTime() / 1000),
channel: ['CANARY', 'BETA', 'STABLE'],
platform: ['PLATFORM_LINUX', 'PLATFORM_MAC'],
},
},
{ ignoreUnknownFields: false },
Expand All @@ -124,6 +127,7 @@ describe('stringifyStudies', () => {
filter: {
start_date: startDate.toISOString(),
channel: ['CANARY', 'BETA', 'STABLE'],
platform: ['PLATFORM_LINUX', 'PLATFORM_MAC'],
},
},
]);
Expand Down

0 comments on commit 35d7e4c

Please sign in to comment.