Skip to content

Instantly share code, notes, and snippets.

@vladimir-kotikov
Created February 18, 2016 07:30
Show Gist options
  • Save vladimir-kotikov/eb8948744ae81ab7826b to your computer and use it in GitHub Desktop.
Save vladimir-kotikov/eb8948744ae81ab7826b to your computer and use it in GitHub Desktop.
How to fake module path
var lodash = require('lodash') // prime cache
require.cache[require.resolve('underscore')] = require.cache[require.resolve('lodash')]
require('assert').equal(require('underscore'), require('lodash'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment