Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil authored and mbostock committed May 1, 2021
1 parent cc52459 commit a720c1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions test/marks/cell-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ tape("cellX() defaults x to identity and y to null", test => {
const cell = Plot.cellX();
test.strictEqual(cell.data, undefined);
test.strictEqual(cell.transform, undefined);
test.deepEqual(cell.channels.map(c => c.name), ["x"]);
test.deepEqual(cell.channels.map(c => Plot.valueof([1, 2, 3], c.value)), [[1, 2, 3]]);
test.deepEqual(cell.channels.map(c => c.scale), ["x"]);
test.deepEqual(cell.channels.map(c => c.name), ["x", "fill"]);
test.deepEqual(cell.channels.map(c => Plot.valueof([1, 2, 3], c.value)), [[ 0, 1, 2 ], [ 1, 2, 3 ]]);
test.deepEqual(cell.channels.map(c => c.scale), ["x", "color"]);
test.strictEqual(cell.channels.find(c => c.name === "x").type, "band");
});

tape("cellY() defaults y to identity and x to null", test => {
const cell = Plot.cellY();
test.strictEqual(cell.data, undefined);
test.strictEqual(cell.transform, undefined);
test.deepEqual(cell.channels.map(c => c.name), ["y"]);
test.deepEqual(cell.channels.map(c => Plot.valueof([1, 2, 3], c.value)), [[1, 2, 3]]);
test.deepEqual(cell.channels.map(c => c.scale), ["y"]);
test.deepEqual(cell.channels.map(c => c.name), ["y", "fill"]);
test.deepEqual(cell.channels.map(c => Plot.valueof([1, 2, 3], c.value)), [[ 0, 1, 2 ], [ 1, 2, 3 ]]);
test.deepEqual(cell.channels.map(c => c.scale), ["y", "color"]);
test.strictEqual(cell.channels.find(c => c.name === "y").type, "band");
});
2 changes: 1 addition & 1 deletion test/plots/high-cardinality-ordinal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default async function() {
type: "ordinal"
},
marks: [
Plot.cellX("ABCDEFGHIJKLMNOPQRSTUVWXYZ", {fill: d => d})
Plot.cellX("ABCDEFGHIJKLMNOPQRSTUVWXYZ", {x: d => d})
]
});
}

0 comments on commit a720c1c

Please sign in to comment.