/
niceSOFT
/
njs
Обзор
Документация
Войти
/
niceSOFT
/
njs
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/js/error_stack_created.t.js
21 строка
431 B
Dmitry Volyntsev
Attach stack in error constructors.
06 фев 2026, 02:32
06 фев 2026, 02:32
05eb443
Код
Авторство
О чём код?
/*--- includes: [] flags: [] ---*/ // Error.stack should be available when error is created (not just thrown) // This matches V8, SpiderMonkey, and QuickJS behavior function inner() { return new Error("test error"); } function outer() { return inner(); } var e = outer(); assert.sameValue(typeof e.stack, 'string'); assert.sameValue(e.stack.includes('inner'), true); assert.sameValue(e.stack.includes('outer'), true);