Improved & unified deprecation handling

* De-duplication now happens in core, not in reporters. This ensures that
  the console doesn't get flooded.
* Stack traces are opt-out, not opt-in.
* The current runnable is not reported or logged for certain deprecations
  where it's irrelevant.
* HtmlReporter shows stack traces in expandable widgets.
* Env#deprecated and Env#deprecatedOnceWithStack are merged.
This commit is contained in:
Steve Gravrock
2021-05-24 20:38:26 -07:00
parent 61fb353197
commit 6a2a30d540
19 changed files with 1328 additions and 302 deletions

View File

@@ -202,7 +202,7 @@ describe('Custom Async Matchers (Integration)', function() {
env.execute(null, done);
});
it('logs a deprecation once per matcher if the matcher factory takes two arguments', function(done) {
it('logs a distinct deprecation for each matcher if the matcher factory takes two arguments', function(done) {
var matcherFactory = function(matchersUtil, customEqualityTesters) {
return { compare: function() {} };
};
@@ -232,7 +232,6 @@ describe('Custom Async Matchers (Integration)', function() {
'See <https://jasmine.github.io/tutorials/upgrading_to_4.0> for details.'
)
);
expect(env.deprecated).toHaveBeenCalledTimes(2);
done();
}