MCPcopy Index your code
hub / github.com/hackmdio/codimd / removeLibModuleCache

Function removeLibModuleCache

test/realtime/utils.js:39–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 delete require.cache[require.resolve(modulePath)]
38}
39function removeLibModuleCache () {
40 const libPath = path.resolve(path.join(__dirname, '../../lib'))
41 Object.keys(require.cache).forEach(key => {
42 if (key.startsWith(libPath)) {
43 delete require.cache[require.resolve(key)]
44 }
45 })
46}
47
48exports.makeMockSocket = makeMockSocket
49exports.removeModuleFromRequireCache = removeModuleFromRequireCache

Callers 5

updateNote.test.jsFile · 0.85
connection.test.jsFile · 0.85
ifMayEdit.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected