Skip to content

Commit f25384e

Browse files
committed
fixup: reduce code duplications
Signed-off-by: Simon Schrottner <[email protected]>
1 parent d323116 commit f25384e

File tree

1 file changed

+7
-4
lines changed
  • libs/providers/flagd-web/src/e2e/step-definitions

1 file changed

+7
-4
lines changed

libs/providers/flagd-web/src/e2e/step-definitions/flag.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,13 @@ export const flagStepDefinitions: StepDefinitions = ({ given, and, when, then })
272272
client.addHandler(ProviderEvents.ConfigurationChanged, async (details) => {
273273
// file writes are not atomic, so we get a few events in quick succession from the testbed
274274
// some will not contain changes, this tolerates that; at least 1 should have our change
275-
if (details?.flagsChanged?.length) {
276-
flagsChanged = details?.flagsChanged;
275+
276+
// All Flags are changed we do not provide a list of changed flags, that is the nature of the web sdk
277+
//if (details?.flagsChanged?.length) {
278+
// flagsChanged = details?.flagsChanged;
277279

278280
resolve(true);
279-
}
281+
//}
280282
});
281283
});
282284
});
@@ -291,7 +293,8 @@ export const flagStepDefinitions: StepDefinitions = ({ given, and, when, then })
291293
});
292294

293295
and(/^the event details must indicate "(.*)" was altered$/, (flagName) => {
294-
expect(flagsChanged).toContain(flagName);
296+
// All Flags are changed we do not provide a list of changed flags, that is the nature of the web sdk
297+
//expect(flagsChanged).toContain(flagName);
295298
});
296299

297300
when(

0 commit comments

Comments
 (0)