fixing names

This commit is contained in:
mpaulson 2022-06-23 10:33:58 -06:00
parent 90fdc7aa06
commit 17b5708d59
12 changed files with 10 additions and 22 deletions

View file

@ -0,0 +1,21 @@
import LinkedList from "@code/doubly-linked-list";
test("linked-list", function() {
const list = new LinkedList<number>();
list.add(5);
list.add(7);
list.add(9);
expect(list.remove()).toEqual(5);
expect(list.length).toEqual(2);
list.add(11);
expect(list.remove()).toEqual(7);
expect(list.remove()).toEqual(9);
expect(list.remove()).toEqual(11);
expect(list.remove()).toEqual(undefined);
});