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

[🚫 Bug] fail-zero flag in .mocharc.json is not respected #1053

Open
EcksDy opened this issue Dec 20, 2023 · 0 comments
Open

[🚫 Bug] fail-zero flag in .mocharc.json is not respected #1053

EcksDy opened this issue Dec 20, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@EcksDy
Copy link
Contributor

EcksDy commented Dec 20, 2023

Describe the bug

When no tests are found, the fail-zero flag in specified .mocharc.json is not respected, and process still does exit 0, although no tests were found.
Logs can be found in the Test OS Ubuntu-latest - VSCode latest step.

P.S.
Test file exists, but no tests are found because of another unrelated issue with my build step. I've completely missed it because I was sure everything is alright since the tests pipeline was green 🤦‍♂️
I want to make sure that whenever no tests are found(files/tests), the ui-test fails.

Steps to reproduce

1. Checkout: https://github.com/EcksDy/vscode-env-switcher/tree/fix-not-failing-when-no-tests-run
2. Run `npm run install:all`
3. Run `npm run ui-test`

Logs

Extension 'env-switcher-0.5.2.vsix' was successfully installed.
Loading mocha configuration from ./src/ui-test/setup/.mocharc.json


  0 passing (1ms)

... exit 0

Operating System

Windows 10, WSL 2, Ubuntu 20.04

Visual Studio Code

1.85.0

vscode-extension-tester

5.10.0

NodeJS

v18.13.0

npm

8.19.3

@EcksDy EcksDy added bug Something isn't working new-issue New issue which was not discussed yet labels Dec 20, 2023
@djelinek djelinek removed the new-issue New issue which was not discussed yet label Dec 20, 2023
@djelinek djelinek added this to the NEXT milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants