From 60d75e19962878f305607b20d8ae81690c524e12 Mon Sep 17 00:00:00 2001 From: mpaulson Date: Wed, 27 Jul 2022 21:20:21 -0600 Subject: [PATCH] feat: small fixes --- src/__tests__/DFSOnBST.ts | 4 ++-- src/__tests__/DoublyLinkedList.ts | 2 +- src/__tests__/ListTest.ts | 7 ------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/__tests__/DFSOnBST.ts b/src/__tests__/DFSOnBST.ts index 99350c9..764d6b7 100644 --- a/src/__tests__/DFSOnBST.ts +++ b/src/__tests__/DFSOnBST.ts @@ -1,7 +1,7 @@ -import dfs from "@code/BTDFS"; +import dfs from "@code/DFSOnBST"; import { tree } from "./tree"; -test("bt dfs", function () { +test("DFS on BST", function () { expect(dfs(tree, 45)).toEqual(true); expect(dfs(tree, 7)).toEqual(true); expect(dfs(tree, 69)).toEqual(false); diff --git a/src/__tests__/DoublyLinkedList.ts b/src/__tests__/DoublyLinkedList.ts index f7429b3..e0e5cfc 100644 --- a/src/__tests__/DoublyLinkedList.ts +++ b/src/__tests__/DoublyLinkedList.ts @@ -2,6 +2,6 @@ import LinkedList from "@code/DoublyLinkedList"; import { test_list } from "./ListTest"; test("DoublyLinkedList", function () { - const list = new LinkedList(3); + const list = new LinkedList(); test_list(list); }); diff --git a/src/__tests__/ListTest.ts b/src/__tests__/ListTest.ts index 46ae710..91ac951 100644 --- a/src/__tests__/ListTest.ts +++ b/src/__tests__/ListTest.ts @@ -3,18 +3,11 @@ export function test_list(list: List): void { list.append(7); list.append(9); - // @ts-ignore - console.log(list.data); - expect(list.get(2)).toEqual(9); expect(list.removeAt(1)).toEqual(7); - // @ts-ignore - console.log(list.data); expect(list.length).toEqual(2); list.append(11); - // @ts-ignore - console.log(list.data); expect(list.removeAt(1)).toEqual(9); expect(list.remove(9)).toEqual(undefined); expect(list.removeAt(0)).toEqual(5);