var BinarySearch = require('./binary-search');

describe('BinarySearch', function() {

  var sortedArray = [1, 2, 3, 4, 5, 6];
  var sortedArrayOfOddLength = [0, 1, 2, 2, 3, 10, 12];
  var unsortedArray = [10, 2, 5, 1];

  it ('should require a sorted array', function() {
    var invalidBinarySearch = new BinarySearch(unsortedArray);
    var validBinarySearch = new BinarySearch(sortedArray);

    expect(typeof invalidBinarySearch.array).toEqual('undefined');
    expect(Array.isArray(validBinarySearch.array)).toEqual(true);
  });

  xit('should find the correct index of an included value', function() {
    expect(2).toEqual(new BinarySearch(sortedArray).indexOf(3));
  });

  xit('should search the middle of the array', function() {
    expect(3).toEqual(new BinarySearch(sortedArrayOfOddLength).indexOf(2));
  });

  xit('should return -1 for a value not in the array', function() {
    expect(-1).toEqual(new BinarySearch(sortedArray).indexOf(10));
  });
});


@@ -617,19 +617,8 @@
 ect(
-2).toEqual(
 new 
@@ -654,16 +654,27 @@
 exOf(3))
+.toEqual(2)
 ;%0A  %7D);%0A
@@ -749,19 +749,8 @@
 ect(
-3).toEqual(
 new 
@@ -797,16 +797,27 @@
 exOf(2))
+.toEqual(3)
 ;%0A  %7D);%0A
@@ -900,20 +900,8 @@
 ect(
--1).toEqual(
 new 
@@ -938,16 +938,28 @@
 xOf(10))
+.toEqual(-1)
 ;%0A  %7D);%0A

fix ordering of actual/expected