var expect = require('chai').expect;
var thirteen = require('../index.js');

describe('thirteen', function () {
  it('should be a function', function () {
    expect(thirteen).to.be.a("function");
  });

  it('should return its argument multiplied by thirteen', function () {
    expect(thirteen(10)).to.eql(130);
  });

  it('should NOT return its argument multiplied by twelve', function () {
    expect(thirteen(10)).to.not.eql(120);
  });

  it('should return its arguments number-like value multiplied by thirteen', function () {
    var wannabeString = {};
    var wannabeValue = {};

    wannabeString.toString = function () { return '13'; };
    wannabeValue.valueOf = function () { return '13'; };

    expect(thirteen(wannabeString)).to.eql(169);
    expect(thirteen(wannabeValue)).to.eql(169);
  });
});


@@ -273,35 +273,245 @@
 ) %7B%0A    
-expect(thirteen(10)
+// Cast to number from string for test comparison. Test will pass even if value is returned with more force (i.e. %22130!!!!!!!!%22).%0A    var returnedAsNumber = parseFloat(thirteen(10).replace(/%5C!/g, %22%22));%0A    expect(returnedAsNumber
 ).to.eql
@@ -606,27 +606,103 @@
     
-expect(thirteen(10)
+var returnedAsNumber = parseFloat(thirteen(10).replace(/%5C!/g, %22%22));%0A    expect(returnedAsNumber
 ).to
@@ -1090,13 +1090,12 @@
 ;%0A  %7D);%0A%7D);%0A
-%0A

Fix test for returning correct value. String trimmed and parsed.