karma-parallel icon indicating copy to clipboard operation
karma-parallel copied to clipboard

Call through for global before-* and after-* blocks (fixes #64)

Open ercultimate opened this issue 1 year ago • 0 comments

  • Please check if the PR fulfills these requirements
  • [x] The commit message follows our guidelines
  • [x] Tests for the changes have been added (for bug fixes / features) - none of the exiting or new tests explicitly verify things. I used the coverage report's execution count to verify.
  • [x] Docs have been added / updated (for bug fixes / features) - no changes, the new behavior is what should be expected
  • What kind of change does this PR introduce? Bug fix

  • What is the current behavior? Global calls to the condition hooks are not executed on any shard. See https://github.com/joeljeske/karma-parallel/issues/64

  • What is the new behavior? The wrapper function will call through to the underlying library function for global calls to before/beforeAll, beforeEach, afterEach, and after/afterAll.

  • Does this PR introduce a breaking change? Unclear if in scope.

    • If the library consumer is using workarounds to run pre-/post-test logic and that logic is not idempotent, then they may see issues due to multiple executions of the pre-/post-test logic.
  • Other information:

ercultimate avatar Apr 28 '23 20:04 ercultimate