@@ -31,6 +31,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3131/* eslint-disable sort-keys */
3232
3333import { AssertionError } from 'assert' ;
34+ import chalk from 'chalk' ;
3435import queueRunner from '../queueRunner' ;
3536import treeProcessor from '../treeProcessor' ;
3637import isError from '../isError' ;
@@ -379,22 +380,26 @@ export default function(j$) {
379380
380381 // TODO throw in Jest 25: declarationError = new Error
381382 if ( isPromise ( describeReturnValue ) ) {
382- console . warn (
383+ console . log (
383384 formatExecError (
384385 new Error (
385- 'Returning a Promise from "describe" is not supported. Tests must be defined synchronously.\n' +
386- 'Returning a value from "describe" will fail the test in a future version of Jest.' ,
386+ chalk . yellow (
387+ 'Returning a Promise from "describe" is not supported. Tests must be defined synchronously.\n' +
388+ 'Returning a value from "describe" will fail the test in a future version of Jest.' ,
389+ ) ,
387390 ) ,
388391 { rootDir : '' , testMatch : [ ] } ,
389392 { noStackTrace : false } ,
390393 ) ,
391394 ) ;
392395 } else if ( describeReturnValue !== undefined ) {
393- console . warn (
396+ console . log (
394397 formatExecError (
395398 new Error (
396- 'A "describe" callback must not return a value.\n' +
397- 'Returning a value from "describe" will fail the test in a future version of Jest.' ,
399+ chalk . yellow (
400+ 'A "describe" callback must not return a value.\n' +
401+ 'Returning a value from "describe" will fail the test in a future version of Jest.' ,
402+ ) ,
398403 ) ,
399404 { rootDir : '' , testMatch : [ ] } ,
400405 { noStackTrace : false } ,
0 commit comments