Skip to content

Jasmine test timeout is ignored #45

@provegard

Description

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

    • bug report
    • feature request
  • Do you want to request a feature or report a bug?

Report a bug

  • What is the current behavior?

When a Jasmine test has a test timeout like this:

it("should fail quickly", () => {
  return new Promise((res, rej) => {});
}, 1);

The resulting failure uses the default Jasmine timeout of 5000 ms instead of the specified timeout of 1 ms.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

The problem is that the wrapping function ignores any parameter after the test definition:

https://github.com/joeljeske/karma-parallel/blob/master/lib/karma-parallelizer.js#L111

I can try to prepare a repro if needed.

  • What is the expected behavior?

The custom timeout specified for the test should be used.

  • Please tell us about your environment:
  • version: 0.3.1
  • Browser: all
  • Language: all
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

The suggested fix is to pass along all arguments (extracted via arguments perhaps) to the wrapped function.

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