@@ -5,7 +5,7 @@ const ArrayStream = require('../common/arraystream');
5
5
const fixtures = require ( '../common/fixtures' ) ;
6
6
const assert = require ( 'assert' ) ;
7
7
const { builtinModules } = require ( 'module' ) ;
8
- const publicModules = builtinModules . filter ( ( lib ) => ! lib . startsWith ( '_' ) ) ;
8
+ const publicUnprefixedModules = builtinModules . filter ( ( lib ) => ! lib . startsWith ( '_' ) && ! lib . startsWith ( 'node: ') ) ;
9
9
10
10
if ( ! common . isMainThread )
11
11
common . skip ( 'process.chdir is not available in Workers' ) ;
@@ -31,7 +31,7 @@ testMe._domain.on('error', assert.ifError);
31
31
// Tab complete provides built in libs for import()
32
32
testMe . complete ( 'import(\'' , common . mustCall ( ( error , data ) => {
33
33
assert . strictEqual ( error , null ) ;
34
- publicModules . forEach ( ( lib ) => {
34
+ publicUnprefixedModules . forEach ( ( lib ) => {
35
35
assert (
36
36
data [ 0 ] . includes ( lib ) && data [ 0 ] . includes ( `node:${ lib } ` ) ,
37
37
`${ lib } not found` ,
@@ -55,7 +55,7 @@ testMe.complete("import\t( 'n", common.mustCall((error, data) => {
55
55
// import(...) completions include `node:` URL modules:
56
56
let lastIndex = - 1 ;
57
57
58
- publicModules . forEach ( ( lib , index ) => {
58
+ publicUnprefixedModules . forEach ( ( lib , index ) => {
59
59
lastIndex = completions . indexOf ( `node:${ lib } ` ) ;
60
60
assert . notStrictEqual ( lastIndex , - 1 ) ;
61
61
} ) ;
0 commit comments