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: suite/test links for HTML reporter may hit unrelated tests #5232

Open
4 tasks done
danny0838 opened this issue Oct 14, 2024 · 0 comments · May be fixed by #5228
Open
4 tasks done

🐛 Bug: suite/test links for HTML reporter may hit unrelated tests #5232

danny0838 opened this issue Oct 14, 2024 · 0 comments · May be fixed by #5228
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: bug a defect, confirmed by a maintainer

Comments

@danny0838
Copy link
Contributor

danny0838 commented Oct 14, 2024

Bug Report Checklist

  • I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
  • I have searched for related issues and issues with the faq label, but none matched my issue.
  • I have '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, my usage of Mocha, or Mocha itself.
  • I want to provide a PR to resolve this

Expected

  1. Click on the link for Case1 => should run only the test Case1 test1
  2. Click on the link for CSS => should run only the test CSS

Actual

  1. Click on the link for Case1 => Case1 test1 and Case10 test1 are run
  2. Click on the link for CSS => CSS and should fix invalid CSS are run

Minimal, Reproducible Example

Create a web page with following tests:

describe('Case1', function () {
  it('test1', function () {
    /* do something */
  });
});

describe('Case10', function () {
  it('test1', function () {
    /* do something */
  });
});

it('CSS', function () {
  /* do something */
});

it('should fix invalid CSS', function () {
  /* do something */
});
  1. Click on the link for Case1.
  2. Click on the link for CSS.

Versions

mocha 10.7.3

Additional Info

No response

@danny0838 danny0838 added status: in triage a maintainer should (re-)triage (review) this issue type: bug a defect, confirmed by a maintainer labels Oct 14, 2024
@danny0838 danny0838 linked a pull request Oct 14, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant