caolan / caolan/nodeunit

No message on stack overflow error

未关闭
#174 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
1.9k
派生
359
PR 合并指标
30 天内没有已合并 PR

描述

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
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先,使用 issue 中所示的 nodeunit 命令和 test-stack-overflow.js 重现该故障。跟踪 runner 如何报告未捕获的递归调用,然后验证输出包含 RangeError 消息,而不只是 "undefined"。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
testing-qa
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。