• Home
  • Raw
  • Download

Lines Matching refs:require

5 const common = require('../common');
6 const assert = require('assert');
7 const fs = require('fs');
8 const path = require('path');
9 const Module = require('module');
10 const tmpdir = require('../common/tmpdir');
21 require.extensions['.bar'] = common.mustNotCall();
22 require.extensions['.foo.bar'] = common.mustCall();
24 require(modulePath);
25 require(file);
26 delete require.cache[file];
27 delete require.extensions['.bar'];
28 delete require.extensions['.foo.bar'];
33 require.extensions['.foo.bar'] = common.mustCall();
35 require(modulePath);
37 () => require(`${modulePath}.foo`),
40 require(`${modulePath}.foo.bar`);
41 delete require.cache[file];
42 delete require.extensions['.foo.bar'];
49 () => require(modulePath),
52 delete require.cache[file];
57 require.extensions['.bar'] = common.mustNotCall();
58 require.extensions['.foo.bar'] = common.mustCall();
60 require(modulePath);
61 delete require.cache[file];
62 delete require.extensions['.bar'];
63 delete require.extensions['.foo.bar'];
68 require.extensions['.foo.bar'] = common.mustNotCall();
71 () => require(modulePath),
74 delete require.extensions['.foo.bar'];
79 require.extensions['.bar'] = common.mustNotCall();
80 require(dotfile);
81 delete require.cache[dotfile];
82 delete require.extensions['.bar'];
87 require.extensions['.bar'] = common.mustCall();
88 require.extensions['.foo.bar'] = common.mustNotCall();
89 require(dotfileWithExtension);
90 delete require.cache[dotfileWithExtension];
91 delete require.extensions['.bar'];
92 delete require.extensions['.foo.bar'];