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