# @testdeck/mocha

> Object oriented testing for the Mocha test framework

Latest version **0.3.3** (published 2022-12-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @testdeck/mocha
pnpm add @testdeck/mocha
yarn add @testdeck/mocha
bun add @testdeck/mocha
```

Provides the command `testdeck-watch`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2022-12-05 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 29.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 235 |
| Author | Panayot Cankov |
| Maintainers | pana-cc, silkentrance |
| Keywords | test, testing, mocha, typescript, bdd, tdd, object oriented, object-oriented |

## Links

- npm: https://www.npmjs.com/package/@testdeck/mocha
- Repository: https://github.com/testdeck/testdeck
- Homepage: https://testdeck.org/
- Issues: https://github.com/testdeck/testdeck/issues
- npm.io page: https://npm.io/package/@testdeck/mocha

## Dependencies (1)

- [@testdeck/core](https://npm.io/package/@testdeck/core.md) ^0.3.3

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.3.3 (latest) — 2022-12-05
- 0.3.2 — 2022-11-10
- 0.3.1 — 2022-11-10
- 0.3.1-pre.0 — 2022-11-07
- 0.3.0 — 2022-10-30
- 0.3.0-pre.1 — 2022-10-29
- 0.3.0-pre.0 — 2022-10-28
- 0.2.2 — 2022-10-28
- 0.2.1 — 2022-09-08
- 0.2.0 — 2021-11-18
- 0.1.2 — 2020-09-24
- 0.1.0 — 2020-05-04
- 0.0.10 — 2020-04-19
- 0.0.9 — 2020-04-17
- 0.0.8 — 2020-04-17
- … 6 more at https://npm.io/package/@testdeck/mocha/versions

## README

[![Get it on NPM](https://img.shields.io/npm/v/@testdeck/mocha.svg)](https://www.npmjs.com/package/@testdeck/mocha)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Build Status](https://github.com/testdeck/testdeck/actions/workflows/ci.yml/badge.svg)](https://github.com/testdeck/testdeck/actions/workflows/ci.yml)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=testdeck_mocha&metric=coverage)](https://sonarcloud.io/summary/new_code?id=testdeck_mocha)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=testdeck_mocha&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=testdeck_mocha)
[![Issues](https://img.shields.io/github/issues/testdeck/testdeck/@testdeck/mocha)](https://github.com/testdeck/testdeck/issues)
[![Pull Requests](https://img.shields.io/github/issues-pr/testdeck/testdeck/@testdeck/mocha)](https://github.com/testdeck/testdeck/pulls)

## @testdeck/mocha

Mocha tests in OOP style!

```TypeScript
import { suite, test } from "@testdeck/mocha";
import { expect } from 'chai';

@suite
class Hello {

  @test
  world() {
    expect(false).to.be.true;
  }
}
```

With support for

- test suite inheritance by either extension or mixins
- individual naming of both suites and tests
- parameterised tests

and more...

If you are looking for other test framework support, please see the following packages

- [@testdeck/jasmine](https://npmjs.com/package/@testdeck/jasmine)
- [@testdeck/mocha](https://npmjs.com/package/@testdeck/mocha)
- [@testdeck/vitest](https://npmjs.com/package/@testdeck/vitest)

## Installation

```shell
npm install --save-dev @types/mocha mocha @testdeck/mocha
```

Additional dependencies need to be installed, unless you use the seed below or follow the instructions in the setup
guide for which a link has been provided below.

## Getting Started

To get you started, a [seed has been provided](https://github.com/testdeck/testdeck-mocha-seed) that can help you with
setting up your project.

```shell
git clone https://github.com/testdeck/testdeck-mocha-seed.git
```

## Additional Information

You can find a lot more information in the [official documentation](https://testdeck.org/), especially in the
[setup guide](https://testdeck.org/pages/guide/setup).

---
_Source: https://npm.io/package/@testdeck/mocha · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
