No message on stack overflow error
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.9k
- Forks
- 359
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Empieza reproduciendo el fallo con el comando nodeunit y test-stack-overflow.js mostrados en el issue. Sigue cómo el runner informa de la llamada recursiva no capturada y, después, verifica que la salida incluye el mensaje RangeError en lugar de solo "undefined".
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- testing-qa
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100