import { describe, it, expect } from "vitest";
import { orderPOICategories } from "./index";
describe("orderPOICategories", () => {
    it("should order the unfiltered subcategories based on the poiCategoryOrder", () => {
        const unfilteredSubcategories = [
            "healthy_restaurants",
            "parks",
            "groceries",
            "fitness",
            "sport_facilities",
            "health_care",
        ];
        orderPOICategories("wellness", unfilteredSubcategories);
        expect(unfilteredSubcategories).toEqual([
            "fitness",
            "healthy_restaurants",
            "health_care",
            "parks",
            "sport_facilities",
            "groceries",
        ]);
    });
    it("should handle unfiltered subcategories that are not in the poiCategoryOrder", () => {
        const unfilteredSubcategories = [
            "unknown_category_1",
            "groceries",
            "parks",
            "unknown_category_2",
        ];
        orderPOICategories("wellness", unfilteredSubcategories);
        expect(unfilteredSubcategories).toEqual([
            "unknown_category_1",
            "unknown_category_2",
            "parks",
            "groceries",
        ]);
    });
    it("should handle an empty unfiltered subcategories array", () => {
        const unfilteredSubcategories = [];
        orderPOICategories("wellness", unfilteredSubcategories);
        expect(unfilteredSubcategories).toEqual([]);
    });
    it("should handle a scoreKey with an empty poiCategoryOrder", () => {
        const unfilteredSubcategories = [
            "healthy_restaurants",
            "parks",
            "groceries",
        ];
        orderPOICategories("pedestrian_friendly", unfilteredSubcategories);
        expect(unfilteredSubcategories).toEqual([
            "healthy_restaurants",
            "parks",
            "groceries",
        ]);
    });
});
//# sourceMappingURL=index.test.js.map