Skip to content

Support CommonJS imports of specific properties

Compare
Choose a tag to compare
@robertknight robertknight released this 20 Jan 16:26
· 149 commits to master since this release

Add support for mocking CommonJS imports of specific properties in one of the following forms:

var foo = require("foo").exportName;

var foo = require("foo")["exportName"];

var foo;
foo = require("foo").exportName;

var foo;
foo = require("foo")["exportName"];