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

formatError cannot filter out stacktrace lines as stated #2626

Closed
levithomason opened this issue Mar 25, 2017 · 0 comments
Closed

formatError cannot filter out stacktrace lines as stated #2626

levithomason opened this issue Mar 25, 2017 · 0 comments

Comments

@levithomason
Copy link
Contributor

Expected behaviour

Per the docs for formatError I expect to be able to:

Format assertion errors and stack traces. Useful for removing vendors and compiled sources.

Actual behaviour

No matter the return value, a new line is always appended to the formatError return value. This makes it impossible to remove the line from the stack. There are always the same number of lines, even if they are empty.

Environment Details

  • Karma version: 1.5.0

  • Relevant part of your karma.config.js file:

    formatError(msg) {
      return ''
    }

Steps to reproduce the behaviour

  1. Create a basic karma config.
  2. Add an formatError config function that returns an empty string.
  3. Write a failing test
  4. Note a new line is appended to every original line in the error message, making it impossible to trim the number of lines in a stack trace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants