Skip to content

Commit

Permalink
Merge pull request #103 from Dakuan/accept-config-object
Browse files Browse the repository at this point in the history
string or object for config
  • Loading branch information
jeffmo committed Aug 5, 2014
2 parents dee24b0 + 1431c58 commit ab3d966
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/jest.js
Expand Up @@ -139,7 +139,11 @@ function runCLI(argv, packageRoot, onComplete) {

var config;
if (argv.config) {
config = utils.loadConfigFromFile(argv.config);
if (typeof argv.config === 'string') {
config = utils.loadConfigFromFile(argv.config);
} else if (typeof argv.config === 'object') {
config = Q(utils.normalizeConfig(argv.config));
}
} else {
var pkgJsonPath = path.join(packageRoot, 'package.json');
var pkgJson = fs.existsSync(pkgJsonPath) ? require(pkgJsonPath) : {};
Expand Down

0 comments on commit ab3d966

Please sign in to comment.