1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

test: fix flaky lifecycle test (#7093)

This commit is contained in:
Mateusz Kwasniewski 2024-05-21 13:40:14 +02:00 committed by GitHub
parent c14fc54e33
commit 45eff83a8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,8 @@ const uncompleteFeature = async (featureName: string, expectedCode = 200) => {
function reachedStage(feature: string, stage: StageName) {
return new Promise((resolve) =>
featureLifecycleService.on(STAGE_ENTERED, (event) => {
if (event.stage === stage) resolve(stage);
if (event.stage === stage && event.feature === feature)
resolve(stage);
}),
);
}