Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianmroz-allegro committed Feb 22, 2022
1 parent f2bbe7b commit 1301e6e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@
*/

import { expect } from "chai";
import { Split } from "../../../../../common/models/split/split";
import { BarChartModel } from "./bar-chart-model";
import { getXDomain } from "./x-domain";

describe("getXDomain", () => {
const mode = { continuousSplit: { reference: "foobar" } } as any as BarChartModel;
const model = { continuousSplit: new Split({ reference: "foobar" }) } as any as BarChartModel;
const datums = [
{ foobar: 1, bazz: 42 },
{ foobar: 65, bazz: 1, qvux: 42 },
{ foobar: "dummy", qvux: 3 }
];

it("should pick split values from datums", () => {
const domain = getXDomain(datums, mode);
const domain = getXDomain(datums, model);
expect(domain).to.be.deep.equal([1, 65, "dummy"]);
});
});

0 comments on commit 1301e6e

Please sign in to comment.