In sut I should I have two kinds of dependencies to be stubbed: 3rd party dependencies (mongodb & co) and own dependencies:var async = require('async'), // This dependency should not be stubbed    mongodb = require('mongodb'), // 3rd party dependency, should be stubbed    myOwnDependency = require('../my/ownDependency.js') // My own dependency, should be stubbedIn JS there are 3 possibilities two stub dependencies.By the most of them (rewire, sinon) all stubbed modules should still physically installed on dev machineI.e. I can not say: please load sut and do not load dependencies to be stubbed - do not execute require for mondodb and ownDependency.js - they are under my control.
Dealing with stubbed external dependency
javascript;unit testing;dependency injection;mocking;stub