Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/is-core-module/test/index.js
rd565449 r0c6b92a 73 73 74 74 t.test('core via builtinModules list', { skip: !data.module }, function (st) { 75 var libs = require('module').builtinModules; 75 var Module = require('module'); 76 var libs = Module.builtinModules; 76 77 if (!libs) { 77 78 st.skip('module.builtinModules does not exist'); … … 97 98 if (excludeList.indexOf(mod) === -1) { 98 99 st.ok(data[mod], mod + ' is a core module'); 100 101 if (Module.isBuiltin) { 102 st.ok(Module.isBuiltin(mod), 'module.isBuiltin(' + mod + ') is true'); 103 } 104 99 105 st.doesNotThrow( 100 106 function () { require(mod); }, // eslint-disable-line no-loop-func 101 107 'requiring ' + mod + ' does not throw' 102 108 ); 109 110 if (process.getBuiltinModule) { 111 st.equal( 112 process.getBuiltinModule(mod), 113 require(mod), 114 'process.getBuiltinModule(' + mod + ') === require(' + mod + ')' 115 ); 116 } 117 103 118 if (mod.slice(0, 5) !== 'node:') { 104 119 if (supportsNodePrefix) { … … 117 132 } 118 133 } 134 119 135 st.end(); 120 136 });
Note:
See TracChangeset
for help on using the changeset viewer.