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

don't truncate message-list Error in Base.list(); closes #2361 #2365

Merged
merged 1 commit into from
Jul 9, 2016

Conversation

boneskull
Copy link
Contributor

@boneskull boneskull commented Jul 9, 2016

when an Error is thrown without a message, we end up setting this message variable to an empty string. But this seems to be a constant:

anyString.indexOf('') === 0

We attempt to remove and format message as it exists within the stack here. Since index === 0, we just end up removing the first character from 'Error'.

This PR ensures that if message === '' then index === -1.

@boneskull
Copy link
Contributor Author

appveyor failure fixed in v3.0.0 branch; merging this anyway

@boneskull boneskull merged commit b37499f into mochajs:master Jul 9, 2016
boneskull added a commit that referenced this pull request Jul 9, 2016
* master:
  don't truncate message-list Error in Base.list(); closes #2361 (#2365)
  Add --preserve-symlinks flag for node (#2364)
  add "expect" to eslint globals in test/
@boneskull boneskull deleted the issue/2361 branch July 9, 2016 06:12
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

Successfully merging this pull request may close these issues.

1 participant