浏览代码

Add mocha.md

Kyle Kamperschroer 9 年之前
父节点
当前提交
186d3f2e25
共有 1 个文件被更改,包括 23 次插入0 次删除
  1. 23 0
      pages/common/mocha.md

+ 23 - 0
pages/common/mocha.md

@@ -0,0 +1,23 @@
+# mocha
+
+> Execute Mocha JavaScript test runner
+
+- Run tests with default configuration or as configured in `mocha.opts`
+
+`mocha`
+
+- Run tests contained at a specific location
+
+`mocha {{folder/with/tests}}`
+
+- Run tests that match a specific grep pattern
+
+`mocha --grep {{^regex$}}`
+
+- Run tests on changes to JavaScript files in the current directory and once initially
+
+`mocha --watch`
+
+- Run tests with a specific reporter
+
+`mocha --reporter {{reporter}}`