mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

Migrate the remaining error tests in the `test/message` folder from Python to JS. Fixes: https://github.com/nodejs/node/issues/47707 PR-URL: https://github.com/nodejs/node/pull/49721 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
24 lines
369 B
JavaScript
24 lines
369 B
JavaScript
'use strict';
|
|
|
|
require('../../common');
|
|
Error.stackTraceLimit = 4;
|
|
|
|
const assert = require('assert');
|
|
|
|
let err;
|
|
// Create some random error frames.
|
|
(function a() {
|
|
(function b() {
|
|
(function c() {
|
|
err = new Error('test error');
|
|
})();
|
|
})();
|
|
})();
|
|
|
|
(function x() {
|
|
(function y() {
|
|
(function z() {
|
|
assert.ifError(err);
|
|
})();
|
|
})();
|
|
})();
|