Closed mikaello closed 5 years ago
When testing the age function it is hardcoded what the result will be, e.g. possibleAgesOfPersonWithIdNumber('04119850938').should.deepEqual([118]), this will only work until 03.11.2016, after that the test will fail, since the person will turn 119.
possibleAgesOfPersonWithIdNumber('04119850938').should.deepEqual([118])
You can use lolex for this to fake time. No issues then - just fake the clock to be a constant (like March 1 2016)
lolex
When testing the age function it is hardcoded what the result will be, e.g.
possibleAgesOfPersonWithIdNumber('04119850938').should.deepEqual([118])
, this will only work until 03.11.2016, after that the test will fail, since the person will turn 119.