/* eslint-env mocha */
const InsertionSort = require('../../../src').Algorithms.Sorting.InsertionSort;
const assert = require('assert');

describe('Insertion Sort', () => {
  it('should have no data when empty initialization', () => {
    const inst = new InsertionSort();
    assert.equal(inst.size, 0);
    assert.deepEqual(inst.unsortedList, []);
    assert.deepEqual(inst.sortedList, []);
  });
});

@@ -392,12 +392,298 @@
 ;%0A  %7D);%0A
+%0A  it('should sort the array', () =%3E %7B%0A    const inst = new InsertionSort(%5B2, 1, 3, 4%5D);%0A    assert.equal(inst.size, 4);%0A%0A    assert.deepEqual(inst.unsortedList, %5B2, 1, 3, 4%5D);%0A    assert.deepEqual(inst.sortedList, %5B1, 2, 3, 4%5D);%0A    assert.equal(inst.toString(), '1, 2, 3, 4');%0A  %7D);%0A%0A
 %7D);%0A

Test Insertion Sort: Test for sorting the array