mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
a02e3e2d5f
Include the require stack in the reported error message. PR-URL: https://github.com/nodejs/node/pull/25690 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
14 lines
308 B
JavaScript
14 lines
308 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('assert');
|
|
|
|
assert.throws(function() {
|
|
require('internal/freelist');
|
|
}, /^Error: Cannot find module 'internal\/freelist'/);
|
|
|
|
assert.strictEqual(
|
|
require(fixtures.path('internal-modules')),
|
|
42
|
|
);
|