mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
Spreadsheet: Add Range(s).first() functions
This commit is contained in:
parent
853f7092f8
commit
6c35419236
2 changed files with 22 additions and 0 deletions
|
@ -94,4 +94,18 @@ describe("Range", () => {
|
|||
});
|
||||
expect(cellsVisited).toEqual(11);
|
||||
});
|
||||
|
||||
test("Range#first", () => {
|
||||
const workbook = createWorkbook();
|
||||
const sheet = createSheet(workbook, "Sheet 1");
|
||||
sheet.makeCurrent();
|
||||
|
||||
sheet.setCell("A", 0, "0");
|
||||
sheet.setCell("A", 1, "0");
|
||||
sheet.setCell("A", 2, "0");
|
||||
sheet.focusCell("A", 0);
|
||||
expect(R`A0:A`.first().name).toEqual("A0");
|
||||
expect(R`A0:A25`.first().name).toEqual("A0");
|
||||
expect(R`A2:A25`.first().name).toEqual("A2");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue