/* eslint-env mocha */
const DoublyLinkedList = require('../../src').DataStructures.DoublyLinkedList;
const assert = require('assert');

describe('DoublyLinkedList', () => {
  it('should be empty when initialized', () => {
    const inst = new DoublyLinkedList();
    assert(inst.isEmpty());
    assert.equal(inst.length, 0);
  });

  it('should push node to the front', () => {
    const inst = new DoublyLinkedList();
    assert(inst.isEmpty());

    inst.push(1);
    assert.equal(inst.length, 1);

    inst.push(2);
    assert.equal(inst.length, 2);

    assert.equal(inst.toString(), '2 -> 1 -> null');
  });
});

@@ -544,24 +544,278 @@
 ength, 2);%0A%0A
+    assert.equal(inst.toString(), '2 -%3E 1 -%3E null');%0A  %7D);%0A%0A  it('should get node at given index', () =%3E %7B%0A    const inst = new DoublyLinkedList();%0A%0A    inst.push(1);%0A    inst.push(2);%0A%0A    const node = inst.getNode(2);%0A    assert.equal(node.value, 1);%0A%0A
     assert.e

Test getNode method