1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-23 13:46:45 +02:00

feat: update test

This commit is contained in:
Thomas Heartman 2023-11-20 12:27:35 +01:00
parent 8666955eab
commit 697d907708
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -144,8 +144,8 @@ describe('addStrategy events should show up in used strategies correctly', () =>
['Cancelled', false], ['Cancelled', false],
['Applied', false], ['Applied', false],
])( ])(
'addStrategy events in %s CRs should show up', 'addStrategy events in %s CRs should show up only of the CR is active',
async (state, shouldShow) => { async (state, isActiveCr) => {
await createCR(state); await createCR(state);
const segmentId = 3; const segmentId = 3;
@ -156,7 +156,7 @@ describe('addStrategy events should show up in used strategies correctly', () =>
await readModel.getStrategiesUsedInActiveChangeRequests( await readModel.getStrategiesUsedInActiveChangeRequests(
segmentId, segmentId,
); );
if (shouldShow) { if (isActiveCr) {
expect(result).toStrictEqual([ expect(result).toStrictEqual([
{ {
projectId: 'default', projectId: 'default',
@ -182,8 +182,8 @@ describe('updateStrategy events should show up in used strategies correctly', ()
['Cancelled', false], ['Cancelled', false],
['Applied', false], ['Applied', false],
])( ])(
'updateStrategy events in %s CRs should show up', `updateStrategy events in %s CRs should show up only of the CR is active`,
async (state, shouldShow) => { async (state, isActiveCr) => {
await createCR(state); await createCR(state);
const segmentId = 3; const segmentId = 3;
@ -196,7 +196,7 @@ describe('updateStrategy events should show up in used strategies correctly', ()
segmentId, segmentId,
); );
if (shouldShow) { if (isActiveCr) {
expect(result).toMatchObject([ expect(result).toMatchObject([
{ {
id: strategyId, id: strategyId,