1 | ## @testdeck/mocha
|
2 |
|
3 | [](https://www.npmjs.com/package/@testdeck/mocha)
|
4 | [](https://www.npmjs.com/package/@testdeck/mocha)
|
5 | [](https://github.com/testdeck/testdeck/issues)
|
6 | [](https://github.com/testdeck/testdeck/pulls)
|
7 | 
|
8 |
|
9 | Mocha tests in OOP style!
|
10 |
|
11 | ```TypeScript
|
12 | import { suite, test } from "@testdeck/mocha";
|
13 | import { expect } from 'chai';
|
14 |
|
15 | @suite
|
16 | class Hello {
|
17 |
|
18 | @test
|
19 | world() {
|
20 | expect(false).to.be.true;
|
21 | }
|
22 | }
|
23 | ```
|
24 |
|
25 | With support for
|
26 |
|
27 | - test suite inheritance by either extension or mixins
|
28 | - individual naming of both suites and tests
|
29 | - parameterised tests
|
30 |
|
31 | and more...
|
32 |
|
33 | If 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
|
42 | npm install --save-dev @types/mocha mocha @testdeck/mocha
|
43 | ```
|
44 |
|
45 | Additional dependencies need to be installed, unless you use the seed below or follow the instructions in the setup
|
46 | guide for which a link has been provided below.
|
47 |
|
48 | ## Getting Started
|
49 |
|
50 | To get you started, a [seed has been provided](https://github.com/testdeck/testdeck-mocha-seed) that can help you with
|
51 | setting up your project.
|
52 |
|
53 | ```shell
|
54 | git clone https://github.com/testdeck/testdeck-mocha-seed.git
|
55 | ```
|
56 |
|
57 | ## Additional Information
|
58 |
|
59 | You 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).
|