diff --git a/index.js b/index.js index 3d9aa54..01c55e3 100644 --- a/index.js +++ b/index.js @@ -7,12 +7,13 @@ var loaderUtils = require("loader-utils"); module.exports = function() {}; module.exports.pitch = function(req) { this.cacheable && this.cacheable(); - var query = loaderUtils.parseQuery(this.query); var source = []; + var query = loaderUtils.parseQuery(this.query); + query.ui = query.ui || 'bdd'; if(this.target == "web") { source.push("require(" + JSON.stringify("!!" + path.join(__dirname, "web.js")) + ");"); source.push("if(typeof window !== 'undefined' && window.initMochaPhantomJS) { window.initMochaPhantomJS(); }"); - source.push("mocha.setup(" + JSON.stringify(query["interface"] || "bdd") + ");"); + source.push("mocha.setup(" + JSON.stringify(query) + ");"); source.push("require(" + JSON.stringify("!!" + req) + ")"); source.push("require(" + JSON.stringify("!!" + path.join(__dirname, "start.js")) + ");"); source.push("if(module.hot) {");