diff --git a/lib/testsuite/context.js b/lib/testsuite/context.js index e78234e5aa..b32f9f9cc5 100644 --- a/lib/testsuite/context.js +++ b/lib/testsuite/context.js @@ -343,8 +343,14 @@ class Context extends EventEmitter { * @param {Boolean=false} [runOnly] If the runner should run only this testsuite */ setDescribeContext({describeTitle, describeInstance, runOnly}) { - if (this.__testSuiteName && !describeInstance) { - throw new Error('There is already a top-level "describe"/"context" declaration in this testsuite.'); + // if `setDescribeContext` is called twice for the same test suite, + // that would mean that there are two `describe()`s in same test suite. + if (this.__testSuiteName && describeInstance) { + // eslint-disable-next-line no-console + console.warn( + 'Nightwatch does not support more than one "describe" declarations in a single testsuite.' + + ' Using this might give unexpected results.' + ); } if (runOnly) {