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

Add failing test case for a word longer than line limit #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tremby
Copy link

@tremby tremby commented Oct 3, 2018

An input string with a word longer than the line length limit, after at least one space, causes an exception to be thrown.

> require('hanging-indent')('a bbbbbbbbbbbbbbbbbbbbbbbbbbbbc', 2, 30);
RangeError: Maximum call stack size exceeded
    at Array.reverse (native)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:21:57)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
    at hangingIndent (/tmp/test/node_modules/hanging-indent/index.js:27:12)
>

An input string with a word longer than the line length limit, after
at least one space, causes an exception to be thrown.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c73efa3 on tremby:long-word-test-case into 61043fb on codekirei:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c73efa3 on tremby:long-word-test-case into 61043fb on codekirei:master.

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.

2 participants