sindresorhus/conf

Jest, console.warn require.cache modification is not permitted

danielweck opened this issue · 1 comments

Due to this:
https://github.com/facebook/jest/pull/9841/files
and this:

conf/index.js

Lines 21 to 23 in 410cc14

// Prevent caching of this module so module.parent is always accurate
delete require.cache[__filename];
const parentDir = path.dirname((module.parent && module.parent.filename) || '.');

=>

console.warn
    `require.cache` modification is not permitted

(output'ed many times in the console when unit-testing, with full stacktrace, so quite disruptive, albeit non-fatal unless unit-tests check for CLI output)