var test = require('tape');
var midpoint = require('./');
var point = require('turf-point');

test('midpoint', function(t){
  var pt1 = point(0,0);
  var pt2 = point(10, 0);
  var expectedMidPoint = point(5, 0);
  var actualMidPoint = midpoint(pt1, pt2);
  t.deepEqual(actualMidPoint, expectedMidPoint, 'should return the halfway point of a horizontal line starting off 0,0');

  var pt1 = point(0,0);
  var pt2 = point(0,10);
  var expectedMidPoint = point(0, 5);
  var actualMidPoint = midpoint(pt1, pt2);
  t.deepEqual(actualMidPoint, expectedMidPoint, 'should return the halfway point of a vertical line starting off 0,0');

  var pt1 = point(1,1);
  var pt2 = point(11,11);
  var expectedMidPoint = point(6, 6);
  var actualMidPoint = midpoint(pt1, pt2);
  t.deepEqual(actualMidPoint, expectedMidPoint, 'should return the halfway point of a diagonal line starting off 1,1');

  t.end();
});
@@ -127,35 +127,37 @@
 var pt1 = point(
+%5B
 0,0
+%5D
 );%0A  var pt2 = p
@@ -165,13 +165,15 @@
 int(
+%5B
 10, 0
+%5D
 );%0A 
@@ -206,12 +206,14 @@
 int(
+%5B
 5, 0
+%5D
 );%0A 
@@ -395,19 +395,21 @@
 = point(
+%5B
 0,0
+%5D
 );%0A  var
@@ -425,12 +425,14 @@
 int(
+%5B
 0,10
+%5D
 );%0A 
@@ -465,12 +465,14 @@
 int(
+%5B
 0, 5
+%5D
 );%0A 
@@ -652,19 +652,21 @@
 = point(
+%5B
 1,1
+%5D
 );%0A  var
@@ -682,13 +682,15 @@
 int(
+%5B
 11,11
+%5D
 );%0A 
@@ -723,12 +723,14 @@
 int(
+%5B
 6, 6
+%5D
 );%0A 
@@ -907,7 +907,8 @@
 ();%0A
-
 %7D);
+%0A

Fix test