You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by anupamtomar August 22, 2023
While Executing the single .js file $ npm run test -- Test\test-cases\basicoperation.js command getting the below error, I debugged and checked with console.log too, execution is just going inside the 'describe' suite but not inside the test 'it', by the time it reaches to test 'it', it got failed at first place and gives the below error in the console, moreover I have mentioned the 'before' hook inside the 'describe' suite but it is bypassing the before hook as well.
Can someone please help me out here?
Error
unhandledRejection: this.client.reporter.setCurrentSection is not a function
TypeError: this.client.reporter.setCurrentSection is not a function
at TestSuite.runGlobalHook (C:\someuser\VSTS_Repository\someProject\node_modules\nightwatch\dist\testsuite\index.js:380:30)
at TestSuite.onTestSuiteFinished (C:\someuser\VSTS_Repository\someProject\node_modules\nightwatch\dist\testsuite\index.js:489:21)
at onSuiteFinished (C:\someuser\VSTS_Repository\someProject\node_modules\nightwatch\dist\runner\test-runners\mocha\custom-runner.js:39:35)
at CustomRunner.runSuite (C:\someuser\VSTS_Repository\someProject\node_modules\nightwatch\dist\runner\test-runners\mocha\custom-runner.js:62:20)
when trying to run a folder (Multiple .js files) $ npm run test -- Test\test-cases command then getting the below kind of console response-
Hey @anupamtomar, Thanks for raising this issue. I've identified this issue it is only occurring when using mocha as a test-runner. Just for my understanding, is there a reason to prefer mocha as a runner over the default runner?
Hi @gravityvi, preferred mocha due to its few potential benefits, nothing major. moreover, for BDD test syntax, Custom Test Hooks, Flexible Test Configuration and etc.
Hi @gravityvi, I am Still facing the same issue, but FYI, I have checked the same project in Other Systems, and it is working fine, and was working fine before the fix too.
Discussed in #3892
Originally posted by anupamtomar August 22, 2023
While Executing the single .js file
$ npm run test -- Test\test-cases\basicoperation.js
command getting the below error, I debugged and checked with console.log too, execution is just going inside the 'describe' suite but not inside the test 'it', by the time it reaches to test 'it', it got failed at first place and gives the below error in the console, moreover I have mentioned the 'before' hook inside the 'describe' suite but it is bypassing the before hook as well.Can someone please help me out here?
when trying to run a folder (Multiple .js files)
$ npm run test -- Test\test-cases
command then getting the below kind of console response-Please find the relevant details below-
Node Version - v18.14.2
npm version - 9.5.0
Java version - java 11.0.12 2021-07-20 LTS
The text was updated successfully, but these errors were encountered: