Improved readability of matcher-related deprecations

* Include stack traces. This makes it easier to find the matcher that
needs to be updated, particularly when it comes from a library rather
than the user's own code.

* Show each deprecation only once unless `config.verboseDeprecations`
is set. Since matchers are often added in a global `beforeEach`, logging
deprecations every time can be overwhelming.
This commit is contained in:
Steve Gravrock
2020-01-18 10:39:51 -08:00
committed by Steve Gravrock
parent 90d6f9d73c
commit 9aed55bb91
11 changed files with 216 additions and 47 deletions

4
spec/helpers/resetEnv.js Normal file
View File

@@ -0,0 +1,4 @@
beforeEach(function() {
// env is stateful. Ensure that it does not leak between tests.
jasmineUnderTest.currentEnv_ = null;
});