blob: b5e0d8d656f65f6b196ee7257b0cdcd093509a43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'use strict';
// Flags: --expose-internals
// This test ensures that search throws errors appropriately
const common = require('../common');
const resolve = require('internal/modules/esm/default_resolve');
common.expectsError(
() => resolve('target', undefined),
{
code: 'ERR_MODULE_NOT_FOUND',
type: Error,
message: /Cannot find package 'target'/
}
);
|