├── .gitignore ├── README.md ├── demo01 ├── add.js └── add.test.js ├── demo02 ├── mochawesome-reports │ ├── css │ │ └── mochawesome.css │ ├── fonts │ │ ├── Roboto+Condensed_300_normal.ttf │ │ ├── Roboto+Condensed_300_normal.woff │ │ ├── Roboto+Condensed_400_normal.svg │ │ ├── Roboto+Condensed_400_normal.ttf │ │ ├── Roboto+Condensed_400_normal.woff │ │ ├── Roboto+Condensed_700_normal.ttf │ │ ├── Roboto+Condensed_700_normal.woff │ │ ├── Roboto+Slab_400_normal.svg │ │ ├── Roboto+Slab_400_normal.ttf │ │ ├── Roboto+Slab_400_normal.woff │ │ ├── mochawesome.eot │ │ ├── mochawesome.svg │ │ ├── mochawesome.ttf │ │ └── mochawesome.woff │ ├── js │ │ ├── mochawesome.js │ │ └── vendor.js │ ├── mochawesome.html │ └── mochawesome.json ├── src │ ├── add.js │ └── multiply.js └── test │ ├── add.test.js │ └── dir │ └── multiply.test.js ├── demo03 ├── src │ ├── add.js │ └── multiply.js └── test │ ├── add.test.js │ ├── dir │ └── multiply.test.js │ └── mocha.opts ├── demo04 ├── .babelrc ├── src │ └── add.js └── test │ └── add.test.js ├── demo05 ├── async.test.js ├── promise.test.js └── timeout.test.js ├── demo06 ├── beforeEach-async.test.js └── beforeEach.test.js ├── demo07 ├── src │ ├── add.js │ └── multiply.js └── test │ ├── add.test.js │ └── dir │ └── multiply.test.js ├── demo08 ├── add.js ├── index.html ├── mocha.css ├── mocha.js └── tests.js ├── demo09 ├── spec.html ├── spec.md ├── src │ ├── add.js │ └── multiply.js └── test │ ├── add.test.js │ └── dir │ └── multiply.test.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/README.md -------------------------------------------------------------------------------- /demo01/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo01/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo01/add.test.js -------------------------------------------------------------------------------- /demo02/mochawesome-reports/css/mochawesome.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/css/mochawesome.css -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_300_normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_300_normal.ttf -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_300_normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_300_normal.woff -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.svg -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.ttf -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_400_normal.woff -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_700_normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_700_normal.ttf -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Condensed_700_normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Condensed_700_normal.woff -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.svg -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.ttf -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/Roboto+Slab_400_normal.woff -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/mochawesome.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/mochawesome.eot -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/mochawesome.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/mochawesome.svg -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/mochawesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/mochawesome.ttf -------------------------------------------------------------------------------- /demo02/mochawesome-reports/fonts/mochawesome.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/fonts/mochawesome.woff -------------------------------------------------------------------------------- /demo02/mochawesome-reports/js/mochawesome.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/js/mochawesome.js -------------------------------------------------------------------------------- /demo02/mochawesome-reports/js/vendor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/js/vendor.js -------------------------------------------------------------------------------- /demo02/mochawesome-reports/mochawesome.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/mochawesome.html -------------------------------------------------------------------------------- /demo02/mochawesome-reports/mochawesome.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/mochawesome-reports/mochawesome.json -------------------------------------------------------------------------------- /demo02/src/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo02/src/multiply.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/src/multiply.js -------------------------------------------------------------------------------- /demo02/test/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/test/add.test.js -------------------------------------------------------------------------------- /demo02/test/dir/multiply.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo02/test/dir/multiply.test.js -------------------------------------------------------------------------------- /demo03/src/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo03/src/multiply.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo03/src/multiply.js -------------------------------------------------------------------------------- /demo03/test/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo03/test/add.test.js -------------------------------------------------------------------------------- /demo03/test/dir/multiply.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo03/test/dir/multiply.test.js -------------------------------------------------------------------------------- /demo03/test/mocha.opts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo03/test/mocha.opts -------------------------------------------------------------------------------- /demo04/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ "es2015" ] 3 | } 4 | -------------------------------------------------------------------------------- /demo04/src/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo04/test/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo04/test/add.test.js -------------------------------------------------------------------------------- /demo05/async.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo05/async.test.js -------------------------------------------------------------------------------- /demo05/promise.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo05/promise.test.js -------------------------------------------------------------------------------- /demo05/timeout.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo05/timeout.test.js -------------------------------------------------------------------------------- /demo06/beforeEach-async.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo06/beforeEach-async.test.js -------------------------------------------------------------------------------- /demo06/beforeEach.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo06/beforeEach.test.js -------------------------------------------------------------------------------- /demo07/src/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo07/src/multiply.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo07/src/multiply.js -------------------------------------------------------------------------------- /demo07/test/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo07/test/add.test.js -------------------------------------------------------------------------------- /demo07/test/dir/multiply.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo07/test/dir/multiply.test.js -------------------------------------------------------------------------------- /demo08/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | -------------------------------------------------------------------------------- /demo08/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo08/index.html -------------------------------------------------------------------------------- /demo08/mocha.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo08/mocha.css -------------------------------------------------------------------------------- /demo08/mocha.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo08/mocha.js -------------------------------------------------------------------------------- /demo08/tests.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo08/tests.js -------------------------------------------------------------------------------- /demo09/spec.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo09/spec.html -------------------------------------------------------------------------------- /demo09/spec.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo09/spec.md -------------------------------------------------------------------------------- /demo09/src/add.js: -------------------------------------------------------------------------------- 1 | function add(x, y) { 2 | return x + y; 3 | } 4 | 5 | module.exports = add; 6 | -------------------------------------------------------------------------------- /demo09/src/multiply.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo09/src/multiply.js -------------------------------------------------------------------------------- /demo09/test/add.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo09/test/add.test.js -------------------------------------------------------------------------------- /demo09/test/dir/multiply.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/demo09/test/dir/multiply.test.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruanyf/mocha-demos/HEAD/package.json --------------------------------------------------------------------------------