From a720c1cb3294b22996159ae09a686da3cfeeb959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Sat, 1 May 2021 05:32:51 +0200 Subject: [PATCH] fix tests --- test/marks/cell-test.js | 12 ++++++------ test/plots/high-cardinality-ordinal.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/marks/cell-test.js b/test/marks/cell-test.js index c742ea3eca..d8d15793ea 100644 --- a/test/marks/cell-test.js +++ b/test/marks/cell-test.js @@ -73,9 +73,9 @@ 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"); }); @@ -83,8 +83,8 @@ 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"); }); diff --git a/test/plots/high-cardinality-ordinal.js b/test/plots/high-cardinality-ordinal.js index 93173168a5..d8821925aa 100644 --- a/test/plots/high-cardinality-ordinal.js +++ b/test/plots/high-cardinality-ordinal.js @@ -6,7 +6,7 @@ export default async function() { type: "ordinal" }, marks: [ - Plot.cellX("ABCDEFGHIJKLMNOPQRSTUVWXYZ", {fill: d => d}) + Plot.cellX("ABCDEFGHIJKLMNOPQRSTUVWXYZ", {x: d => d}) ] }); }