doipjs/node_modules/mocha/lib/nodejs/file-unloader.js
Yarmo Mackenbach e996bc8023 Initial commit
2020-10-23 22:35:53 +02:00

15 lines
277 B
JavaScript

'use strict';
/**
* This module should not be in the browser bundle, so it's here.
* @private
* @module
*/
/**
* Deletes a file from the `require` cache.
* @param {string} file - File
*/
exports.unloadFile = file => {
delete require.cache[require.resolve(file)];
};