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

Exclusive test (.only()) do not work at all with karma 4.0.1 on latest karma-sharding #5

Open
1 of 3 tasks
ghost opened this issue Apr 29, 2019 · 0 comments
Open
1 of 3 tasks

Comments

@ghost
Copy link

ghost commented Apr 29, 2019

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • **I'm submitting a ... **

    • bug report
    • feature request
    • support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?
    bug

  • What is the current behavior?
    The package.json specifies a version of karma 2.0.0 or above.
    However, it appears that if you use karma 4.0.1, the sharding causes .only() to not work at all. So, even if you set .only() on an it() or describe(), it runs all of the tests (regardless of the number of browsers you set).

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

Rather than setting up a plunker, you can change the package.json file to specify karma 4.0.1, add a .only() to an it(), then run your test suite with 1 browser.

  • What is the expected behavior?
    It (.only()) should work the same with 2.0.0 and 4.0.1.

  • What is the motivation / use case for changing the behavior?
    We want .only() to work the same regardless of the version of karma.

  • Please tell us about your environment:

  • version: master HEAD
  • Browser: Chrome headless
  • Language: ES5
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
    I'm guessing that as part of the refactor of karma to NOT use classnames as part of only(), etc., they changed the architecture so that maybe the part that inspects for only() happens at a different time in the flow of the code, so it isn't working correctly with the hack that is sharding (the way the files are divided up, etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants