Skip to content

Commit

Permalink
[test] Takes the Menu as an example in the test documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 27, 2017
1 parent a3719a2 commit d136075
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/README.md
Expand Up @@ -31,12 +31,14 @@ trade-off, mainly completeness vs. speed.
First, we have the **unit test** suite.
It uses [mocha](https://mochajs.org) and the *shallow* API of [enzyme](https://github.com/airbnb/enzyme) to allow testing the components in isolation.
It's the fastest approach, and is best suited for testing many combinations.
Here is an [example](https://github.com/callemall/material-ui/blob/a3719a203515b1ad683e62085cb5065318c0c87f/src/Menu/Menu.spec.js#L18) with the `<Menu />` component.

Next, we have the **integration** tests.
We are using the *mount* API of [enzyme](https://github.com/airbnb/enzyme).
It allows testing the integration of different components using a virtual DOM.
This virtual DOM is provided by [jsdom](https://github.com/tmpvar/jsdom).
It's here to make sure components work together.
Here is an [example](https://github.com/callemall/material-ui/blob/a3719a203515b1ad683e62085cb5065318c0c87f/test/integration/Menu.spec.js#L29) with the `<Menu />` component.

### DOM API level

Expand Down Expand Up @@ -65,6 +67,8 @@ Next, we are using [docker](https://github.com/docker/docker) to take screenshot
![before](/test/docs-regressions-before.png)
![diff](/test/docs-regressions-diff.png)

Here is an [example](https://github.com/callemall/material-ui/blob/a3719a203515b1ad683e62085cb5065318c0c87f/test/regressions/tests/Menu/SimpleMenuList.js#L7) with the `<Menu />` component.

#### Installation

The visual regression tests suite has a hard dependency on [docker](https://github.com/docker/docker).
Expand Down

0 comments on commit d136075

Please sign in to comment.