@@ -5,7 +5,7 @@ const ArrayStream = require('../common/arraystream');
55const fixtures = require ( '../common/fixtures' ) ;
66const assert = require ( 'assert' ) ;
77const { builtinModules } = require ( 'module' ) ;
8- const publicModules = builtinModules . filter ( ( lib ) => ! lib . startsWith ( '_' ) ) ;
8+ const publicUnprefixedModules = builtinModules . filter ( ( lib ) => ! lib . startsWith ( '_' ) && ! lib . startsWith ( 'node: ') ) ;
99
1010if ( ! common . isMainThread )
1111 common . skip ( 'process.chdir is not available in Workers' ) ;
@@ -31,7 +31,7 @@ testMe._domain.on('error', assert.ifError);
3131// Tab complete provides built in libs for import()
3232testMe . complete ( 'import(\'' , common . mustCall ( ( error , data ) => {
3333 assert . strictEqual ( error , null ) ;
34- publicModules . forEach ( ( lib ) => {
34+ publicUnprefixedModules . forEach ( ( lib ) => {
3535 assert (
3636 data [ 0 ] . includes ( lib ) && data [ 0 ] . includes ( `node:${ lib } ` ) ,
3737 `${ lib } not found` ,
@@ -55,7 +55,7 @@ testMe.complete("import\t( 'n", common.mustCall((error, data) => {
5555 // import(...) completions include `node:` URL modules:
5656 let lastIndex = - 1 ;
5757
58- publicModules . forEach ( ( lib , index ) => {
58+ publicUnprefixedModules . forEach ( ( lib , index ) => {
5959 lastIndex = completions . indexOf ( `node:${ lib } ` ) ;
6060 assert . notStrictEqual ( lastIndex , - 1 ) ;
6161 } ) ;
0 commit comments