import { describe, it, expect } from "vitest";
import { getHighlightScoreKeys } from "./index";
describe("getHighlightScoreKeys", () => {
    it("should filter out scores below the minimum value", () => {
        const scores = {
            pedestrian_friendly: { value: 0.3, text: "Pedestrian" },
            car_friendly: { value: 3.6, text: "Car" },
            transit_friendly: { value: 4, text: "Transit" },
            cycling_friendly: { value: 0.6, text: "Cycling" },
        };
        // @ts-expect-error - It's fine to pass an incomplete scores object for this test
        const result = getHighlightScoreKeys(scores);
        expect(result).toEqual(["transit_friendly", "car_friendly"]);
    });
    it("should return an empty array if no scores meet the minimum value", () => {
        const scores = {
            pedestrian_friendly: { value: 0.3, text: "Pedestrian" },
            car_friendly: { value: 0.6, text: "Car" },
            transit_friendly: { value: 0.4, text: "Transit" },
            cycling_friendly: { value: 0.2, text: "Cycling" },
        };
        // @ts-expect-error - It's fine to pass an incomplete scores object for this test
        const result = getHighlightScoreKeys(scores);
        expect(result).toEqual([]);
    });
    it("should return the top 3 scores that meet the minimum value", () => {
        const scores = {
            pedestrian_friendly: { value: 4.85, text: "Pedestrian" },
            car_friendly: { value: 5, text: "Car" },
            transit_friendly: { value: 4.65, text: "Transit" },
            cycling_friendly: { value: 4.45, text: "Cycling" },
        };
        // @ts-expect-error - It's fine to pass an incomplete scores object for this test
        const result = getHighlightScoreKeys(scores);
        expect(result).toEqual([
            "car_friendly",
            "pedestrian_friendly",
            "transit_friendly",
        ]);
    });
    it("should return an empty array if scores is empty", () => {
        const scores = {};
        // @ts-expect-error - It's fine to pass an incomplete scores object for this test
        const result = getHighlightScoreKeys(scores);
        expect(result).toEqual([]);
    });
    it("should return an empty array if scores is undefined", () => {
        const scores = undefined;
        // @ts-expect-error - It's fine to pass an incomplete scores object for this test
        const result = getHighlightScoreKeys(scores);
        expect(result).toEqual([]);
    });
});
//# sourceMappingURL=index.test.js.map