# meteor-easy-test

> Fast start to testing your Meteor app. with (mocha/chai/sinon and React test utils). Follow on GitHub to be notified.

Latest version **1.1.1** (published 2016-03-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install meteor-easy-test
pnpm add meteor-easy-test
yarn add meteor-easy-test
bun add meteor-easy-test
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-03-29 |
| First published | 2016-03-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sarkis Arutiunian |
| Maintainers | sarkistlt |
| Keywords | meteor, react, testing, test, bdd, tdd, mocha, chai, sinon, meteor mocha, meteor TDD, meteor BDD, meteor test |

## Links

- npm: https://www.npmjs.com/package/meteor-easy-test
- Repository: https://github.com/sarkistlt/meteor-easy-test
- Homepage: https://github.com/sarkistlt/meteor-easy-test#readme
- Issues: https://github.com/sarkistlt/meteor-easy-test/issues
- npm.io page: https://npm.io/package/meteor-easy-test

## Dependencies (7)

- [chai](https://npm.io/package/chai.md) ^3.5.0
- [jsdom](https://npm.io/package/jsdom.md) ^8.1.0
- [mocha](https://npm.io/package/mocha.md) ^2.4.5
- [sinon](https://npm.io/package/sinon.md) ^1.17.3
- [sinon-chai](https://npm.io/package/sinon-chai.md) ^2.8.0
- [mocha-jsdom](https://npm.io/package/mocha-jsdom.md) ^1.1.0
- [react-addons-test-utils](https://npm.io/package/react-addons-test-utils.md) ^0.14.7

## 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

- 1.1.1 (latest) — 2016-03-29
- 1.1.0 — 2016-03-29
- 1.0.12 — 2016-03-28
- 1.0.11 — 2016-03-28
- 1.0.9 — 2016-03-28
- 1.0.8 — 2016-03-24
- 1.0.7 — 2016-03-24
- 1.0.6 — 2016-03-24
- 1.0.5 — 2016-03-24
- 1.0.4 — 2016-03-24
- 1.0.3 — 2016-03-24
- 1.0.1 — 2016-03-23

## README

# Meteor-easy-test (beta)

This package allows you to start testing your application (client and server side), using popular tools mocha/chai/sinon and React testing utils in few step.

----------
**note:**
- use React instead of Blaze.
- tested on  Meteor 1.3, with React.

***It's just beta, so design and function will be improved.*** 
***Special thanks for the feedback and suggestions!***

----------
**How to start.**

 - first, install package:

~~~shell
npm i meteor-easy-test
~~~

 - second, create folder in root:

> /test

 - then create the file:

> /test/test.jsx

 - In the file `test.jsx` first you have to import config:

~~~js
import 'meteor-easy-test/config';
~~~



**That's it!**

----------
 Now you can start to write your test right inside this file, wrap it in function and export:
~~~js
import 'meteor-easy-test/config';

export default () => {
    describe("my test case", function () {
        it("my test", function () {
            assert.equal(1, 1);
        });
    });
};
~~~

or:
~~~js
import 'meteor-easy-test/config';

export let testCase = () => {
    describe("my test case", function () {
        it("my test", function () {
            assert.equal(1, 1);
        });
    });
};
~~~

this will even work:

~~~js
import 'meteor-easy-test/config';

export default () => {
    describe("my test case", function () {
        it("my test", function () {
            assert.equal(1, 1);
        });
    });
};
export let testCase = () => {
    describe("my test case", function () {
        it("my test", function () {
            assert.equal(1, 1);
        });
    });
};
~~~
but don't use this option :)


----------


You can create different test cases in different file (but make sure that all files are in folder `test` ), and just call them in `test.jsx`.
 
`first-case.jsx`:
~~~js
 export default testCase = () => {
     describe("my test case", function () {
         it("my test", function () {
             assert.equal(1, 1);
         });
     });
 }();
~~~
 
`test.jsx`:
~~~js
 import 'meteor-easy-test/config';
 
 import testCase from './first-case';
 import anotherCase from './another-case'; // the number of cases is not limited
 
 export {testCase, anotherCase};
~~~


To show test result you should add React component in your application. To do that just import component `<TestBord />` and mount wherever you want.
~~~js
import TestBord from 'meteor-easy-test';
~~~


----------
**Thank you for your attention) hope this package was helpful for you!**
***p.s. star to be notified***

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