Overriding Dependencies with Proxyquire Flashcards
1
Q
How do you isolate a unit with a dependency?
A
By manipulating Node.js’ ‘require’ cache by substituting your own code in place of the target dependency.
How do you isolate a unit with a dependency?
By manipulating Node.js’ ‘require’ cache by substituting your own code in place of the target dependency.