Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to log mochaOpts in the test? #3605

Closed
1 of 4 tasks
shridharkalagi opened this issue Dec 10, 2018 · 5 comments
Closed
1 of 4 tasks

How to log mochaOpts in the test? #3605

shridharkalagi opened this issue Dec 10, 2018 · 5 comments
Labels
stale this has been inactive for a while... status: needs mcve a defect report needing more information; subject to closing due to inactivity status: waiting for author waiting on response from OP - more information needed type: question support question

Comments

@shridharkalagi
Copy link

Prerequisites

  • Checked that your issue hasn't already been filed by cross-referencing issues with the faq label
  • Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
  • 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
  • Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with: node node_modules/.bin/mocha --version(Local) and mocha --version(Global). We recommend avoiding the use of globally installed Mocha.

Description

How do I print mochaOpts.retries in the test? Currently, tests are triggered from a 3rd party service and I'm not sure whether the tests are retried or not. So I wanna add a console log to figure out the how the tests are configured. Can someone help me here?

Steps to Reproduce

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: 5.2.0
  • The output of node --version: 10.11.0
  • The version and architecture of your operating system: Mac
  • Your shell (bash, zsh, PowerShell, cmd, etc.): zsh
  • Your browser and version (if running browser tests): Chrome 69
  • Any other third party Mocha related modules (with versions):
  • The code transpiler being used:
@craigtaub craigtaub added the type: question support question label Dec 11, 2018
@craigtaub
Copy link
Contributor

Have you tried logging this.retries() inside the test? It should be highest priority retry value at that time.

@shridharkalagi
Copy link
Author

This is not working for me. Is there any other way?

@craigtaub
Copy link
Contributor

Can you print what code you are using and what is happening. Thanks

@craigtaub
Copy link
Contributor

Any movement on this?
Could you provide an MCVE (https://stackoverflow.com/help/mcve) please

@plroebuck plroebuck added status: waiting for author waiting on response from OP - more information needed status: needs mcve a defect report needing more information; subject to closing due to inactivity labels Feb 4, 2019
@stale
Copy link

stale bot commented Jun 4, 2019

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Jun 4, 2019
@stale stale bot closed this as completed Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale this has been inactive for a while... status: needs mcve a defect report needing more information; subject to closing due to inactivity status: waiting for author waiting on response from OP - more information needed type: question support question
Projects
None yet
Development

No branches or pull requests

3 participants