chore: Don't bundle #6050 or #5511.

This commit is contained in:
Daniel J. Geiger 2023-09-01 14:30:52 -05:00
parent 23eb08088e
commit 4e4802b19e
6 changed files with 18 additions and 114 deletions

View file

@ -1,6 +1,5 @@
import {
Spreadsheet,
sortSpreadsheet,
tryParseCells,
tryParseNumber,
VALID_SPREADSHEET,
@ -119,29 +118,4 @@ describe("charts", () => {
expect(values).toEqual([61, -60, 85, -67, 54, 95]);
});
});
describe("sortSpreadsheet", () => {
it("sorts strictly numerical labels columns in ascending order", () => {
const spreadsheet = [
["x", "y"],
["1°", "1"],
["9°", "2"],
["3°", "3"],
["6°", "4"],
];
const result = tryParseCells(spreadsheet);
expect(result.type).toBe(VALID_SPREADSHEET);
const { title, labels, values } = sortSpreadsheet(
(result as { type: typeof VALID_SPREADSHEET; spreadsheet: Spreadsheet })
.spreadsheet,
);
expect(title).toEqual("y");
expect(labels).toEqual(["1°", "3°", "6°", "9°"]);
expect(values).toEqual([1, 3, 4, 2]);
});
});
});