| Test shouldBeNow() in js-test.js |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| PASS Date.now() is equivalent to Date.now(). |
| PASS new Date() is equivalent to Date.now(). |
| Testing type checking with a string. This should fail. |
| FAIL 'Hello world!' is not a number or a Date. Got Hello world! |
| Testing past dates. This should fail. |
| FAIL 50000 is not the curent time. Got 50000 which is 10 seconds in the past. |
| Testing future dates. This should fail. |
| FAIL 70000 is not the current time. Got 70000 which is 10 seconds in the future. |
| Testing a slightly past date with the implicit delta. This should pass. |
| PASS 59990 is equivalent to Date.now(). |
| Testing a slightly future date with the implicit delta. This should pass. |
| PASS 60010 is equivalent to Date.now(). |
| Testing a past date with a large delta. This should pass. |
| PASS 50000 is equivalent to Date.now(). |
| Testing a future date with a large delta. This should pass. |
| PASS 70000 is equivalent to Date.now(). |
| Simulating a defective clock that always goes backwards. The test below should fail. |
| FAIL new Date() cannot be tested against the current time. The clock is going backwards too often. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |