Skip to content

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

Description

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.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions