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.
Node.js – Testing and Code Quality > Overriding Dependencies with Proxyquire > Flashcards
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.