blob: ab9a997b504baf57dadd3d64594db42dcfe364dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Flags: --expose-internals
'use strict';
const common = require('../common');
common.expectsError(
() => {
require('internal/bootstrap/loaders');
}, {
code: 'MODULE_NOT_FOUND',
message: /Cannot find module 'internal\/bootstrap\/loaders'/
}
);
common.expectsError(
() => {
const source = 'module.exports = require("internal/bootstrap/loaders")';
const { internalBinding } = require('internal/test/binding');
internalBinding('natives').owo = source;
require('owo');
}, {
code: 'MODULE_NOT_FOUND',
message: /Cannot find module 'owo'/
}
);
|