Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64a0c80

Browse filesBrowse files
clakechevanlucas
authored andcommitted
loader: test search module
PR-URL: #16795 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 83f9604 commit 64a0c80
Copy full SHA for 64a0c80

File tree

Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Collapse file
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
// Flags: --expose-internals
3+
4+
// This test ensures that search throws errors appropriately
5+
6+
const common = require('../common');
7+
8+
const search = require('internal/loader/search');
9+
const errors = require('internal/errors');
10+
11+
common.expectsError(
12+
() => search('target', undefined),
13+
{
14+
code: 'ERR_MISSING_MODULE',
15+
type: errors.Error,
16+
message: 'Cannot find module target'
17+
}
18+
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.