We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0b6da6 commit 8945f2fCopy full SHA for 8945f2f
linked-list/linkedlist.spec.js
@@ -0,0 +1,16 @@
1
+const assert = require('assert');
2
+const LinkedList = require('./linkedlist');
3
+
4
+describe('LinkedList', function () {
5
+ describe('.addLast', function () {
6
+ it('should add elements to the tail', function () {
7
+ const list = new LinkedList();
8
+ list.add(1);
9
+ list.add(2);
10
+ list.add(3);
11
+ list.add(4);
12
13
+ assert(list.toString(), '1 -> 2 -> 3 -> 4');
14
+ });
15
16
+});
0 commit comments