aboutsummaryrefslogtreecommitdiff
path: root/src/rbtree.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-12-18 20:26:07 +1100
committerTerry Truong <terry06890@gmail.com>2022-12-18 20:26:07 +1100
commitfac881d61176f04a4062db710df98924a76b0ffb (patch)
tree6c55c0f100668888a31dc54daa24d9d794bdba76 /src/rbtree.ts
parent83366605d1bd43c245c4c110fadfd1a6fd05d3c2 (diff)
Add unit testing
Install vitest, happy-dom, and @testing-library/vue Add lib.ts and rbtree.ts tests in tests/ Modularise some date-range-managing code from App.vue into lib.ts
Diffstat (limited to 'src/rbtree.ts')
-rw-r--r--src/rbtree.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rbtree.ts b/src/rbtree.ts
index 8422dec..b4ae540 100644
--- a/src/rbtree.ts
+++ b/src/rbtree.ts
@@ -1,6 +1,6 @@
// Copied from node_modules/bintrees/lib/, and adapted to use ES6, classes, and typescript
-class Node<T> {
+export class Node<T> {
data: T;
left: Node<T> | null;
right: Node<T> | null;
@@ -24,7 +24,7 @@ class Node<T> {
}
}
-class Iterator<T> {
+export class Iterator<T> {
_tree: RBTree<T>;
_ancestors: Node<T>[];
_cursor: Node<T> | null;