Skip to content

Commit cfc6e2f

Browse files
committed
Improve test isolation and scenario name formatting
Signed-off-by: Marko Mlakar <[email protected]>
1 parent 17f12da commit cfc6e2f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/providers/flagd/src/e2e/step-definitions/configSteps.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ export const configSteps: Steps = (state: State) => {
1313
}
1414
}
1515

16+
const originalEnv = { ...process.env };
17+
1618
return ({ given, when, then }: StepsDefinitionCallbackOptions) => {
1719
beforeEach(() => {
1820
state.options = {};
1921
state.config = undefined;
2022
state.events = [];
21-
const originalEnv = { ...process.env };
2223
Object.keys(process.env).forEach((key) => delete process.env[key]);
2324
Object.assign(process.env, originalEnv);
2425
});

libs/providers/flagd/src/e2e/tests/config.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('config', () => {
1313
autoBindSteps(
1414
loadFeatures(CONFIG_FEATURE, {
1515
scenarioNameTemplate: (vars) => {
16-
const tags = [...vars.scenarioTags, ...vars.featureTags];
16+
const tags = [...new Set([...vars.scenarioTags, ...vars.featureTags])];
1717
return `${vars.scenarioTitle}${tags.length > 0 ? ` (${tags.join(', ')})` : ''}`;
1818
},
1919
}),

0 commit comments

Comments
 (0)