Fail specs that try to combine two forms of async

This commit is contained in:
Steve Gravrock
2020-09-17 14:47:25 -07:00
parent 235efe52f1
commit c2b558a2da
3 changed files with 16 additions and 21 deletions

View File

@@ -218,18 +218,16 @@ getJasmineRequireObj().QueueRunner = function(j$) {
if (retval && j$.isFunction_(retval.then)) {
// Issue a warning that matches the user's code
if (j$.isAsyncFunction_(fn)) {
this.deprecated(
this.onException(
'An asynchronous before/it/after ' +
'function was defined with the async keyword but also took a ' +
'done callback. This is not supported and will stop working in' +
' the future. Either remove the done callback (recommended) or ' +
'done callback. Either remove the done callback (recommended) or ' +
'remove the async keyword.'
);
} else {
this.deprecated(
this.onException(
'An asynchronous before/it/after ' +
'function took a done callback but also returned a promise. ' +
'This is not supported and will stop working in the future. ' +
'Either remove the done callback (recommended) or change the ' +
'function to not return a promise.'
);