Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed so that timing will always use native Date instance instead of …
…mock even for badly designed tests (#240) The user might mock the Date. Because of this KarmaReporter saved a reference to the native Date and used that reference for measuring duration. The problem was that it only worked when users followed best practises when writing tests. If a user wrote a "bad" test where the Date is mocked immediately in the body of a decribe instead of inside an it or beforeEach, the Date was already mocked by the time KarmaReporter was called. By saving the reference at the time adapter.js is executed instead of when KarmaReporter is run, this problem is circumvented.
- Loading branch information