Lines Matching refs:require
23 const common = require('../common');
24 const tmpdir = require('../common/tmpdir');
26 const assert = require('assert');
27 const fs = require('fs');
28 const path = require('path');
122 function() { require('../fixtures/packages/unparseable'); },
128 const root = require('../fixtures/cycles/root');
129 const foo = require('../fixtures/cycles/folder/foo');
137 require('../fixtures/node_modules/foo');
142 const my_path = require('../fixtures/path');
145 assert.throws(function() { require('./utils'); },
151 require('../fixtures/throws_error');
160 require.extensions['.test'] = function(module, filename) {
168 assert.strictEqual(require('../fixtures/registerExt').test, 'passed');
170 assert.strictEqual(require('../fixtures/registerExt.hello.world').test,
174 require.extensions['.test'] = function(module) {
180 assert.strictEqual(require('../fixtures/registerExt2').custom, 'passed');
182 assert.strictEqual(require('../fixtures/foo').foo, 'ok');
188 require(tmpdir.path);
199 require.extensions['.reg'] = require.extensions['.js'];
200 require.extensions['.reg2'] = require.extensions['.js'];
202 assert.strictEqual(require(`${loadOrder}file1`).file1, 'file1');
203 assert.strictEqual(require(`${loadOrder}file2`).file2, 'file2.js');
205 () => require(`${loadOrder}file3`),
217 assert.strictEqual(require(`${loadOrder}file4`).file4, 'file4.reg');
218 assert.strictEqual(require(`${loadOrder}file5`).file5, 'file5.reg2');
219 assert.strictEqual(require(`${loadOrder}file6`).file6, 'file6/index.js');
221 () => require(`${loadOrder}file7`),
232 assert.strictEqual(require(`${loadOrder}file8`).file8, 'file8/index.reg');
233 assert.strictEqual(require(`${loadOrder}file9`).file9, 'file9/index.reg2');
239 const parent = require('../fixtures/module-require/parent/');
240 const child = require('../fixtures/module-require/child/');
247 const json = require('../fixtures/packages/main/package.json');
349 assert.strictEqual(require('../fixtures/utf8-bom.js'), 42);
350 assert.strictEqual(require('../fixtures/utf8-bom.json'), 42);
355 require('../fixtures/utf8-bom-shebang-shebang.js');
357 assert.strictEqual(require('../fixtures/utf8-shebang-bom.js'), 42);
362 require('../fixtures/test-error-first-line-offset.js');