Skip to content

Commit 1d810f7

Browse files
committed
changes for 0.5.0
Signed-off-by: Todd Baert <[email protected]>
1 parent e9ae049 commit 1d810f7

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

integration/step-definitions/evaluation.spec.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import {
55
EvaluationDetails,
66
JsonObject,
77
JsonValue,
8-
ResolutionDetails,
9-
ResolutionReason,
10-
StandardResolutionReasons
8+
ResolutionDetails, StandardResolutionReasons
119
} from '../../src/types';
1210

1311
// load the feature file.
@@ -122,7 +120,7 @@ defineFeature(feature, (test) => {
122120
(expectedValue: string, expectedVariant: string, expectedReason: string) => {
123121
expect(details.value).toEqual(expectedValue === 'true');
124122
expect(details.variant).toEqual(expectedVariant);
125-
expect(details.reason).toEqual(convertExpectationToStatic(expectedReason));
123+
expect(details.reason).toEqual(expectedReason);
126124
}
127125
);
128126
});
@@ -144,7 +142,7 @@ defineFeature(feature, (test) => {
144142
(expectedValue: string, expectedVariant: string, expectedReason: string) => {
145143
expect(details.value).toEqual(expectedValue);
146144
expect(details.variant).toEqual(expectedVariant);
147-
expect(details.reason).toEqual(convertExpectationToStatic(expectedReason));
145+
expect(details.reason).toEqual(expectedReason);
148146
}
149147
);
150148
});
@@ -166,7 +164,7 @@ defineFeature(feature, (test) => {
166164
(expectedValue: string, expectedVariant: string, expectedReason: string) => {
167165
expect(details.value).toEqual(Number.parseInt(expectedValue));
168166
expect(details.variant).toEqual(expectedVariant);
169-
expect(details.reason).toEqual(convertExpectationToStatic(expectedReason));
167+
expect(details.reason).toEqual(expectedReason);
170168
}
171169
);
172170
});
@@ -188,7 +186,7 @@ defineFeature(feature, (test) => {
188186
(expectedValue: string, expectedVariant: string, expectedReason: string) => {
189187
expect(details.value).toEqual(Number.parseFloat(expectedValue));
190188
expect(details.variant).toEqual(expectedVariant);
191-
expect(details.reason).toEqual(convertExpectationToStatic(expectedReason));
189+
expect(details.reason).toEqual(expectedReason);
192190
}
193191
);
194192
});
@@ -217,7 +215,7 @@ defineFeature(feature, (test) => {
217215
/^the variant should be '(.*)', and the reason should be '(.*)'$/,
218216
(expectedVariant: string, expectedReason: string) => {
219217
expect(details.variant).toEqual(expectedVariant);
220-
expect(details.reason).toEqual(convertExpectationToStatic(expectedReason));
218+
expect(details.reason).toEqual(expectedReason);
221219
}
222220
);
223221
});
@@ -315,6 +313,3 @@ defineFeature(feature, (test) => {
315313
);
316314
});
317315
});
318-
319-
const convertExpectationToStatic = (reason: ResolutionReason) =>
320-
reason === StandardResolutionReasons.DEFAULT ? StandardResolutionReasons.STATIC : undefined;

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"default": "./dist/cjs/index.js"
4343
},
4444
"devDependencies": {
45-
"@openfeature/flagd-provider": "^0.5.1",
45+
"@openfeature/flagd-provider": "~0.6.0",
4646
"@types/jest": "^28.1.4",
4747
"@types/node": "^18.0.3",
4848
"@typescript-eslint/eslint-plugin": "^5.23.0",

0 commit comments

Comments
 (0)