0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/es-module/test-esm-loader-search.js
Daniel Bevenius f2b10799ef lib: rename js source to lower snake_case
This commit renames all JavaScript source files in lib to lower
snake_case.

PR-URL: https://github.com/nodejs/node/pull/19556
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-03-28 08:09:16 +02:00

18 lines
372 B
JavaScript

'use strict';
// Flags: --expose-internals
// This test ensures that search throws errors appropriately
const common = require('../common');
const { search } = require('internal/modules/esm/default_resolve');
common.expectsError(
() => search('target', undefined),
{
code: 'ERR_MISSING_MODULE',
type: Error,
message: 'Cannot find module target'
}
);