Looks like quibble.absolutify()
is not careful enough to correctly handle core modules that happen to have the same name as installed dependencies.
For instance, tests of my suite broke because I'm using util
core module and one of my dependencies loads util
polyfill in node_modules (via require('util/')
) beforehand.
Quibble fakeLoad()
is first called with "util/", [Module], false
and it correctly
resolves it to /node_modules/util/util.js
. Then fakeLoad()
gets called with "util", [Module], false
but instead of recognising it as a core module, it resolves it to /node_modules/util/util.js
again.
As I'm using util.promisify
(not available in the polyfill) my tests break as my code ends up consuming the poyfill instead of the node core module.