fixing names
This commit is contained in:
parent
90fdc7aa06
commit
17b5708d59
12 changed files with 10 additions and 22 deletions
21
src/__tests__/DoublyLinkedList.ts
Normal file
21
src/__tests__/DoublyLinkedList.ts
Normal 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);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue