ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
CI / Typecheck, test & build (push) Failing after 2s
This commit is contained in:
@@ -454,13 +454,29 @@ describe("S4 rekommendationsvyer", () => {
|
||||
});
|
||||
|
||||
// default utan samtycke = depersonalize(DEFAULT_WEIGHTS) == NON_PERSONALIZED_WEIGHTS
|
||||
const defaultRanked = rankAll([pantry, healthy, tasty], nonPersonalCtx, depersonalize(viewWeights("default")));
|
||||
const nonPersonalDefaultRanked = rankAll([pantry, healthy, tasty], nonPersonalCtx, NON_PERSONALIZED_WEIGHTS);
|
||||
expect(defaultRanked.map((r) => r.recipeId)).toEqual(nonPersonalDefaultRanked.map((r) => r.recipeId));
|
||||
const defaultRanked = rankAll(
|
||||
[pantry, healthy, tasty],
|
||||
nonPersonalCtx,
|
||||
depersonalize(viewWeights("default")),
|
||||
);
|
||||
const nonPersonalDefaultRanked = rankAll(
|
||||
[pantry, healthy, tasty],
|
||||
nonPersonalCtx,
|
||||
NON_PERSONALIZED_WEIGHTS,
|
||||
);
|
||||
expect(defaultRanked.map((r) => r.recipeId)).toEqual(
|
||||
nonPersonalDefaultRanked.map((r) => r.recipeId),
|
||||
);
|
||||
|
||||
// vyerna är fortfarande skilda från default även utan samtycke
|
||||
expect(rankAll([tasty, healthy, pantry], nonPersonalCtx, depersonalize(viewWeights("pantry")))[0]?.recipeId).toBe("pantry");
|
||||
expect(rankAll([tasty, pantry, healthy], nonPersonalCtx, depersonalize(viewWeights("health")))[0]?.recipeId).toBe("healthy");
|
||||
expect(
|
||||
rankAll([tasty, healthy, pantry], nonPersonalCtx, depersonalize(viewWeights("pantry")))[0]
|
||||
?.recipeId,
|
||||
).toBe("pantry");
|
||||
expect(
|
||||
rankAll([tasty, pantry, healthy], nonPersonalCtx, depersonalize(viewWeights("health")))[0]
|
||||
?.recipeId,
|
||||
).toBe("healthy");
|
||||
|
||||
// taste-vyn honoreras men personliga axlar är nollade
|
||||
const tasteWeights = depersonalize(viewWeights("taste"));
|
||||
|
||||
Reference in New Issue
Block a user