# mocha-demos **Repository Path**: mini-docker/mocha-demos ## Basic Information - **Project Name**: mocha-demos - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-04 - **Last Updated**: 2024-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README This repo is for my article ["A Mocha tutorial of Examples"](http://www.ruanyifeng.com/blog/2015/12/a-mocha-tutorial-of-examples.html) (in Chinese). > "Mocha is a feature-rich JavaScript test framework running on Node.js and the browser, making asynchronous testing simple and fun." > > -- [Mochajs.org](https://mochajs.org/) ![](http://www.ruanyifeng.com/blogimg/asset/2015/bg2015120301.png) ## How to use First, clone the repo. ```bash $ git clone https://github.com/ruanyf/mocha-demos.git ``` Then, install the dependencies locally and Mocha globally. ```bash $ cd mocha-demos $ npm install $ npm install --global mocha ``` Enter the `demo01` subdirectory. ```bash $ mocha add.test.js ``` Now, play with the other examples under the repo's demo* directories. ## Index - [demo01: basic usage](https://github.com/ruanyf/mocha-demos/tree/master/demo01) - [demo02: command parameters](https://github.com/ruanyf/mocha-demos/tree/master/demo02) - [demo03: mocha.opts](https://github.com/ruanyf/mocha-demos/tree/master/demo03) - [demo04: ES6 testing](https://github.com/ruanyf/mocha-demos/tree/master/demo04) - [demo05: async testing](https://github.com/ruanyf/mocha-demos/tree/master/demo05) - [demo06: hooks](https://github.com/ruanyf/mocha-demos/tree/master/demo06) - [demo07: exclusive/inclusive Tests](https://github.com/ruanyf/mocha-demos/tree/master/demo07) - [demo08: browser testing](https://github.com/ruanyf/mocha-demos/tree/master/demo08) - [demo09: generating spec](https://github.com/ruanyf/mocha-demos/tree/master/demo09) ## License MIT