No message on stack overflow error
- Dominant language
- JavaScript
- Stars
- 1.9k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
When running a test that calls a function that overflows the stack,
only "undefined" is printed instead of the error message, which can
be very confusing.
```
$ nodeunit test-stack-overflow.js
test-stack-overflow.js
✖ test
undefined
FAILURES: 1/1 assertions failed (2ms)
```
test-stack-overflow.js:
``` javascript
function rec() { rec(); };
exports.test = function(test) {
rec();
};
```
I was expecting the error I get when rec() is called directly:
```
test-stack-overflow.js:1
on rec() { rec()
^
RangeError: Maximum call stack size exceeded
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with the nodeunit command and test-stack-overflow.js shown in the issue. Trace how the runner reports the uncaught recursive call, then verify that the output includes the RangeError message instead of only "undefined".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100