var test = require('../../src/assertion/ttr')
var humanize = require('../../src/number/humanize')

test('humanize(n, options) should delimit thousandths', function (t) {
  t.is(humanize(1000), '1,000')
  t.is(humanize(1000000), '1,000,000')
  t.is(humanize(10500), '10,500')
})

test('humanize(n, options) should retain fractions', function (t) {
  t.is(humanize(15.99), '15.99')
  t.is(humanize(1500.99), '1,500.99')
})

test('"delimiter" option should change the delimiter', function (t) {
  t.is(humanize(1500, { delimiter: '.' }), '1.500')
})

test('"separator" option should change the separator', function (t) {
  t.is(humanize(15.99, { separator: ',' }), '15,99')
})

test.result()

@@ -1,16 +1,20 @@
 var 
-test
+painless
  = requi
@@ -41,13 +41,99 @@
 ion/
-ttr')
+painless')%0Avar test = painless.createGroup('Test number/humanize')%0Avar t = painless.assert%0A
 %0Avar
@@ -240,33 +240,32 @@
 ths', function (
-t
 ) %7B%0A  t.is(human
@@ -416,33 +416,32 @@
 ons', function (
-t
 ) %7B%0A  t.is(human
@@ -560,33 +560,32 @@
 ter', function (
-t
 ) %7B%0A  t.is(human
@@ -693,17 +693,16 @@
 nction (
-t
 ) %7B%0A  t.
@@ -757,19 +757,4 @@
 %0A%7D)%0A
-%0Atest.result()%0A

update test number/humanize -- convert to painless