diff options
Diffstat (limited to 'Userland/Applications/Spreadsheet/Tests')
-rw-r--r-- | Userland/Applications/Spreadsheet/Tests/free-functions.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/Tests/free-functions.js b/Userland/Applications/Spreadsheet/Tests/free-functions.js index dbc7de1220..9ad2629f3a 100644 --- a/Userland/Applications/Spreadsheet/Tests/free-functions.js +++ b/Userland/Applications/Spreadsheet/Tests/free-functions.js @@ -125,6 +125,16 @@ describe("Statistics", () => { expect(max(R`B0:B9`)).toEqual(81); }); + test("sumProductIf", () => { + expect(sumProductIf).toBeDefined(); + expect(sumProductIf((a, b) => b > 25, R`A0:A9`, R`B0:B9`)).toEqual(1800); + }); + + test("sumProduct", () => { + expect(sumProduct).toBeDefined(); + expect(sumProduct(R`A0:A9`, R`B0:B9`)).toEqual(2025); + }); + test("median", () => { expect(median).toBeDefined(); expect(median(R`A0:A9`)).toEqual(4.5); |