Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
WebStorm Run-'Edit Configuration' 设置为运行 Mocha 测试。
Mocha Javascript 测试代码接受 nconf 命令行参数,例如 --user='production'
如何将 Mocha 测试的“编辑配置”设置为接受 nconf 命令行参数?
您可以为此使用Extra Mocha Options字段:
使用以下代码时对我来说很好:
var nconf = require('nconf'); nconf.argv(); describe("Numbers", function () { var foo, json; beforeEach(function(){ foo = nconf.get('foo'); ...