summaryrefslogtreecommitdiff
path: root/test/message/if-error-has-good-stack.js
blob: 1db25d2fa55a1bd66193b4c1311771a640e32456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';

require('../common');
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);
    })();
  })();
})();