Skip to content

mocha --watch doesn't work with v6.0.0 #3748

@fcruzel

Description

@fcruzel

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 (only tested in my machine, in the same project).
  • 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. (N/A - no global version installed)

Description

mocha --watch doesn't detect the tests. Output: 0 passing (10 ms). It did in the 5.2.0 version.

Steps to Reproduce

Update to 6.0.0, write a test or use the ones you already have and try to execute the watcher. mocha will work, mocha --watch wont.

Expected behavior: [What you expect to happen]

  • mocha --watch detect the tests,
  • and executes every time a test or a src file change.

Actual behavior: [What actually happens]

  • mocha --watch doesn't detect any test.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

  • The output of mocha --version and node node_modules/.bin/mocha --version: 6.0.0
  • The output of node --version: 11.9.0
  • The version and architecture of your operating system: Ubuntu 18.04.1 LTS, 4.15.0-45-generic x86_64
  • Your shell (bash, zsh, PowerShell, cmd, etc.): bash
  • Your browser and version (if running browser tests): N/A
  • Any other third party Mocha related modules (with versions): [email protected]
  • The code transpiler being used:

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions