Upstream simple-statistics/simple-statistics state of the touched files before afe3d20779
This commit is contained in:
1 parent
24fe35e78e
commit
cd7bef4165
2 files changed
+62
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { describe, it } from "node:test";
|
||||
import * as ss from "../index.js";
|
||||
|
||||
describe("permutationsHeap", function () {
|
||||
it("generates 1 permutation", function () {
|
||||
assert.deepEqual(ss.permutationsHeap([1]), [[1]]);
|
||||
});
|
||||
it("generates 1, 2, 3 permutations", function () {
|
||||
assert.deepEqual(ss.permutationsHeap([1, 2, 3]), [
|
||||
[1, 2, 3],
|
||||
[2, 1, 3],
|
||||
[3, 1, 2],
|
||||
[1, 3, 2],
|
||||
[2, 3, 1],
|
||||
[3, 2, 1]
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user