summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authoru9g <git@u9g.dev>2022-02-25 21:59:12 -0500
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-02-27 02:48:32 +0330
commit6c35419236cdba84d4d166db4b5de122af967bd0 (patch)
tree4f94d83261610e2d1bfade3ee655f421bcb2334c /Userland
parent853f7092f8b5ee6b17a5d4672cf9a6d1592c8e5b (diff)
downloadserenity-6c35419236cdba84d4d166db4b5de122af967bd0.zip
Spreadsheet: Add Range(s).first() functions
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Spreadsheet/Tests/basic.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/Tests/basic.js b/Userland/Applications/Spreadsheet/Tests/basic.js
index 2f30be3bd5..8a9cefb8a8 100644
--- a/Userland/Applications/Spreadsheet/Tests/basic.js
+++ b/Userland/Applications/Spreadsheet/Tests/basic.js
@@ -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");
+ });
});