Merge branch '3.99' into 4.0
This commit is contained in:
@@ -2627,70 +2627,6 @@ describe('Env integration', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('should report deprecation warnings on the correct specs and suites', function(done) {
|
||||
var reporter = jasmine.createSpyObj('reporter', [
|
||||
'jasmineDone',
|
||||
'suiteDone',
|
||||
'specDone'
|
||||
]);
|
||||
|
||||
// prevent deprecation from being displayed, as well as letting us observe calls
|
||||
spyOn(console, 'error');
|
||||
|
||||
env.addReporter(reporter);
|
||||
|
||||
env.deprecated('top level deprecation');
|
||||
|
||||
env.describe('suite', function() {
|
||||
env.beforeAll(function() {
|
||||
env.deprecated('suite level deprecation');
|
||||
});
|
||||
|
||||
env.it('spec', function() {
|
||||
env.deprecated('spec level deprecation');
|
||||
});
|
||||
});
|
||||
|
||||
env.execute(null, function() {
|
||||
var result = reporter.jasmineDone.calls.argsFor(0)[0];
|
||||
expect(result.deprecationWarnings).toEqual([
|
||||
jasmine.objectContaining({ message: 'top level deprecation' })
|
||||
]);
|
||||
/* eslint-disable-next-line no-console */
|
||||
expect(console.error).toHaveBeenCalledWith(
|
||||
'DEPRECATION: top level deprecation'
|
||||
);
|
||||
|
||||
expect(reporter.suiteDone).toHaveBeenCalledWith(
|
||||
jasmine.objectContaining({
|
||||
fullName: 'suite',
|
||||
deprecationWarnings: [
|
||||
jasmine.objectContaining({ message: 'suite level deprecation' })
|
||||
]
|
||||
})
|
||||
);
|
||||
/* eslint-disable-next-line no-console */
|
||||
expect(console.error).toHaveBeenCalledWith(
|
||||
'DEPRECATION: suite level deprecation (in suite: suite)'
|
||||
);
|
||||
|
||||
expect(reporter.specDone).toHaveBeenCalledWith(
|
||||
jasmine.objectContaining({
|
||||
fullName: 'suite spec',
|
||||
deprecationWarnings: [
|
||||
jasmine.objectContaining({ message: 'spec level deprecation' })
|
||||
]
|
||||
})
|
||||
);
|
||||
/* eslint-disable-next-line no-console */
|
||||
expect(console.error).toHaveBeenCalledWith(
|
||||
'DEPRECATION: spec level deprecation (in spec: suite spec)'
|
||||
);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should report deprecation stack with an error object', function(done) {
|
||||
var exceptionFormatter = new jasmineUnderTest.ExceptionFormatter(),
|
||||
reporter = jasmine.createSpyObj('reporter', [
|
||||
|
||||
Reference in New Issue
Block a user