Instructions state to take a number, double every 2nd digit from the right, subtract 9 if >= 10 and add all results and check whether result % 10 is 0.
There however is a test that fails:
it('should check a valid Canadian SIN', function()
assert.equal(true, luhn.valid('046 454 286'))
end)
Use instructions:
0 + 8 + 6 + 8 +5 + 8 + 2 + 5 + 6 = 48
So result should be false (48 % 10 ~= 0).