diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/Spreadsheet/Tests/basic.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/Tests/basic.js b/Userland/Applications/Spreadsheet/Tests/basic.js index f8b6074ae9..26573aa1b9 100644 --- a/Userland/Applications/Spreadsheet/Tests/basic.js +++ b/Userland/Applications/Spreadsheet/Tests/basic.js @@ -189,6 +189,17 @@ describe("Range", () => { }); }); +describe("SplitRange", () => { + makeSheet(); + test("Range#filter => SplitRange", () => { + const range = R`A0:B`.filter(c => c.value() % 2 === 1); + expect(range.toString()).toEqual('SplitRange.fromNames("A0", "A2", "B0", "B2")'); + expect(resolve(range)).toEqual(["1", "3", "1", "9"]); + expect(numericResolve(range)).toEqual([1, 3, 1, 9]); + expect(count(range)).toEqual(4); + }); +}); + describe("R function", () => { makeSheet(); |