Skip to content

Commit

Permalink
Added a migration guide link to multiple done call deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
sgravrock committed Dec 14, 2021
1 parent f3b26a0 commit 57c294b
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 15 deletions.
17 changes: 13 additions & 4 deletions lib/jasmine-core/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,9 @@ x */
"An asynchronous function called its 'done' " +
'callback more than once. This is a bug in the spec, beforeAll, ' +
'beforeEach, afterAll, or afterEach function in question. This will ' +
'be treated as an error in a future version.\n' +
'be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in spec: ' +
self.getFullName() +
')',
Expand Down Expand Up @@ -8780,7 +8782,10 @@ getJasmineRequireObj().ReportDispatcher = function(j$) {
deprecated(
"An asynchronous reporter callback called its 'done' callback " +
'more than once. This is a bug in the reporter callback in ' +
'question. This will be treated as an error in a future version.',
'question. This will be treated as an error in a future ' +
'version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.',
{ ignoreRunnable: true }
);
}
Expand Down Expand Up @@ -10370,7 +10375,9 @@ getJasmineRequireObj().Suite = function(j$) {
"An asynchronous function called its 'done' callback more than " +
'once. This is a bug in the spec, beforeAll, beforeEach, afterAll, ' +
'or afterEach function in question. This will be treated as an error ' +
'in a future version.\n' +
'in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in suite: ' +
this.getFullName() +
')';
Expand All @@ -10379,7 +10386,9 @@ getJasmineRequireObj().Suite = function(j$) {
'A top-level beforeAll or afterAll function called its ' +
"'done' callback more than once. This is a bug in the beforeAll " +
'or afterAll function in question. This will be treated as an ' +
'error in a future version.';
'error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.';
}

this.env.deprecated(msg, { ignoreRunnable: true });
Expand Down
4 changes: 3 additions & 1 deletion spec/core/SpecSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,9 @@ describe('Spec', function() {
"An asynchronous function called its 'done' " +
'callback more than once. This is a bug in the spec, beforeAll, ' +
'beforeEach, afterAll, or afterEach function in question. This will ' +
'be treated as an error in a future version.\n' +
'be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in spec: a spec)',
{ ignoreRunnable: true }
);
Expand Down
8 changes: 6 additions & 2 deletions spec/core/SuiteSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ describe('Suite', function() {
'A top-level beforeAll or afterAll function called its ' +
"'done' callback more than once. This is a bug in the beforeAll " +
'or afterAll function in question. This will be treated as an ' +
'error in a future version.',
'error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.',
{ ignoreRunnable: true }
);
});
Expand All @@ -258,7 +260,9 @@ describe('Suite', function() {
"An asynchronous function called its 'done' callback more than " +
'once. This is a bug in the spec, beforeAll, beforeEach, afterAll, ' +
'or afterEach function in question. This will be treated as an error ' +
'in a future version.\n' +
'in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in suite: the parent suite the suite)',
{ ignoreRunnable: true }
);
Expand Down
16 changes: 12 additions & 4 deletions spec/core/integration/EnvSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ describe('Env integration', function() {
'A top-level beforeAll or afterAll function called its ' +
"'done' callback more than once. This is a bug in the beforeAll " +
'or afterAll function in question. This will be treated as an ' +
'error in a future version.';
'error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.';

spyOn(console, 'error');
env.addReporter(reporter);
Expand Down Expand Up @@ -555,7 +557,9 @@ describe('Env integration', function() {
"An asynchronous function called its 'done' " +
'callback more than once. This is a bug in the spec, beforeAll, ' +
'beforeEach, afterAll, or afterEach function in question. This will ' +
'be treated as an error in a future version.';
'be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.';

spyOn(console, 'error');
env.addReporter(reporter);
Expand Down Expand Up @@ -601,7 +605,9 @@ describe('Env integration', function() {
"An asynchronous function called its 'done' " +
'callback more than once. This is a bug in the spec, beforeAll, ' +
'beforeEach, afterAll, or afterEach function in question. This will ' +
'be treated as an error in a future version.\n' +
'be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in spec: a suite a spec)';

spyOn(console, 'error');
Expand Down Expand Up @@ -644,7 +650,9 @@ describe('Env integration', function() {
var message =
"An asynchronous reporter callback called its 'done' callback more " +
'than once. This is a bug in the reporter callback in question. This ' +
'will be treated as an error in a future version.\nNote: This message ' +
'will be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\nNote: This message ' +
'will be shown only once. Set the verboseDeprecations config property ' +
'to true to see every occurrence.';

Expand Down
5 changes: 4 additions & 1 deletion src/core/ReportDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ getJasmineRequireObj().ReportDispatcher = function(j$) {
deprecated(
"An asynchronous reporter callback called its 'done' callback " +
'more than once. This is a bug in the reporter callback in ' +
'question. This will be treated as an error in a future version.',
'question. This will be treated as an error in a future ' +
'version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.',
{ ignoreRunnable: true }
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/core/Spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ x */
"An asynchronous function called its 'done' " +
'callback more than once. This is a bug in the spec, beforeAll, ' +
'beforeEach, afterAll, or afterEach function in question. This will ' +
'be treated as an error in a future version.\n' +
'be treated as an error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in spec: ' +
self.getFullName() +
')',
Expand Down
8 changes: 6 additions & 2 deletions src/core/Suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ getJasmineRequireObj().Suite = function(j$) {
"An asynchronous function called its 'done' callback more than " +
'once. This is a bug in the spec, beforeAll, beforeEach, afterAll, ' +
'or afterEach function in question. This will be treated as an error ' +
'in a future version.\n' +
'in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.\n' +
'(in suite: ' +
this.getFullName() +
')';
Expand All @@ -251,7 +253,9 @@ getJasmineRequireObj().Suite = function(j$) {
'A top-level beforeAll or afterAll function called its ' +
"'done' callback more than once. This is a bug in the beforeAll " +
'or afterAll function in question. This will be treated as an ' +
'error in a future version.';
'error in a future version. See' +
'<https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#deprecations-due-to-calling-done-multiple-times> ' +
'for more information.';
}

this.env.deprecated(msg, { ignoreRunnable: true });
Expand Down

0 comments on commit 57c294b

Please sign in to comment.