var assert = require('assert');
var tfn = require('..');

var validNumbers = [
 '865414088',
 '459-599-230',
 '1124-740-82',
 '565.051.603',
 '907 974 668'
];

describe('tfn', function() {
  it('should mark valid tfn numbers as valid', function() {
    validNumbers.forEach(function(t) {
      assert.deepEqual(tfn(t), { valid: true });
    });
  });


  it('should return suggestion that is valid tfn itself', function() {
    validNumbers.forEach(function(t) {
      var validNum = t.replace(/[^\d]g/, '');
      for (var i=0; i < 0; ++i) {
        var num = validNum.slice(0,8) + i.toString();
        var result = tfn(t);
        assert.equal(result.valid, false);
        assert.equal(result.suggestion, validNum);
        assert.deepEqual(tfn(result.suggestion), { valid: true });
      }
    });
  });
});

@@ -61,21 +61,27 @@
 r validN
-umber
+ineDigitTfn
 s = %5B%0A '
@@ -159,16 +159,207 @@
 68'%0A%5D;%0A%0A
+var validEightDigitTfns = %5B%0A  '81 854 402',%0A  '37 118 629',%0A  '37 118 660',%0A  '37 118 705',%0A  '38 593 474',%0A  '38 593 519',%0A  '85 655 734',%0A  '85 655 797',%0A  '85 655 810',%0A  '37 118 655'%0A%5D;%0A%0A
 describe
@@ -399,24 +399,32 @@
  mark valid 
+9 digit 
 tfn numbers 
@@ -449,37 +449,221 @@
 n() %7B%0A    validN
-umber
+ineDigitTfns.forEach(function(t) %7B%0A      assert.deepEqual(tfn(t), %7B valid: true %7D);%0A    %7D);%0A  %7D);%0A%0A  it('should mark valid 8 digit tfn numbers as valid', function() %7B%0A    validEightDigitTfn
 s.forEach(functi
@@ -734,17 +734,16 @@
 %0A  %7D);%0A%0A
-%0A
   it('sh
@@ -815,21 +815,27 @@
   validN
-umber
+ineDigitTfn
 s.forEac

Add test for eight digit TFNs