UNPKG

1.84 kBMarkdownView Raw
1## @testdeck/mocha
2
3[![Get it on NPM](https://img.shields.io/npm/v/@testdeck/mocha.svg)](https://www.npmjs.com/package/@testdeck/mocha)
4[![Downloads per Week](https://img.shields.io/npm/dw/@testdeck/mocha.svg)](https://www.npmjs.com/package/@testdeck/mocha)
5[![Issues](https://img.shields.io/github/issues/testdeck/testdeck.svg)](https://github.com/testdeck/testdeck/issues)
6[![Pull Requests](https://img.shields.io/github/issues-pr/testdeck/testdeck.svg)](https://github.com/testdeck/testdeck/pulls)
7![Apache 2.0 License](https://img.shields.io/npm/l/@testdeck/mocha.svg)
8
9Mocha tests in OOP style!
10
11```TypeScript
12import { suite, test } from "@testdeck/mocha";
13import { expect } from 'chai';
14
15@suite
16class Hello {
17
18 @test
19 world() {
20 expect(false).to.be.true;
21 }
22}
23```
24
25With support for
26
27- test suite inheritance by either extension or mixins
28- individual naming of both suites and tests
29- parameterised tests
30
31and more...
32
33If you are looking for other test framework support, please see the following packages
34
35- [@testdeck/jasmine](https://npmjs.com/package/@testdeck/jasmine)
36- [@testdeck/jest](https://npmjs.com/package/@testdeck/jest)
37
38
39## Installation
40
41```shell
42npm install --save-dev @types/mocha mocha @testdeck/mocha
43```
44
45Additional dependencies need to be installed, unless you use the seed below or follow the instructions in the setup
46guide for which a link has been provided below.
47
48## Getting Started
49
50To get you started, a [seed has been provided](https://github.com/testdeck/testdeck-mocha-seed) that can help you with
51setting up your project.
52
53```shell
54git clone https://github.com/testdeck/testdeck-mocha-seed.git
55```
56
57## Additional Information
58
59You can find a lot more information in the [official documentation](https://testdeck.org/), especially in the
60[setup guide](https://testdeck.org/pages/guide/setup).