Upstream simple-statistics/simple-statistics state of the touched files before e26d2c41ca

This commit is contained in:
upstream committed 2026-09-03 14:04:54 +02:00
commit 1aa682fd34
2 files changed
+61

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import * as ss from "../index.js";
describe("combinations", function () {
it("generates 1 permutation", function () {
assert.deepEqual(ss.combinationsReplacement(Object.freeze([1]), 1), [
[1]
]);
});
it("generates combinations of 1,2 choosing two at a time, with replacement", function () {
assert.deepEqual(ss.combinationsReplacement(Object.freeze([1, 2]), 2), [
[1, 1],
[1, 2],
[2, 2]
]);
});
});