Skip to content

Commit

Permalink
fix 🐛: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
squiles committed Dec 3, 2024
1 parent 5300dda commit 535f4e6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions app/charts/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ describe("initial config", () => {

describe("enabled chart types", () => {
it("should allow appropriate chart types based on available dimensions", () => {
const expectedChartTypes = ["area", "column", "line", "pie", "table"];
const expectedChartTypes = [
"area",
"bar",
"column",
"line",
"pie",
"table",
];
const { enabledChartTypes, possibleChartTypesDict } = getEnabledChartTypes({
dimensions: bathingWaterData.data.dataCubeByIri
.dimensions as any as Dimension[],
Expand Down Expand Up @@ -212,14 +219,20 @@ describe("enabled chart types", () => {
).toBe(true);
});

it("should only allow column, map, pie and table if only geo dimensions are available", () => {
it("should only allow column, bar, map, pie and table if only geo dimensions are available", () => {
const { enabledChartTypes, possibleChartTypesDict } = getEnabledChartTypes({
dimensions: [{ __typename: "GeoShapesDimension" }] as any,
measures: [{ __typename: "NumericalMeasure" }] as any,
cubeCount: 1,
});

expect(enabledChartTypes.sort()).toEqual(["column", "map", "pie", "table"]);
expect(enabledChartTypes.sort()).toEqual([
"bar",
"column",
"map",
"pie",
"table",
]);
expect(possibleChartTypesDict["line"].message).toBeDefined();
});

Expand Down

0 comments on commit 535f4e6

Please sign in to comment.