Skip to content

Commit

Permalink
Rename reagent to enzyme
Browse files Browse the repository at this point in the history
Fixes #43
Closes #46
  • Loading branch information
lelandrichardson committed Dec 6, 2015
1 parent f467edf commit 38ae4b2
Show file tree
Hide file tree
Showing 39 changed files with 92 additions and 92 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -8,14 +8,14 @@ always be given.

## Setting up your environment

After forking reagent to your own github org, do the following steps to get started:
After forking enzyme to your own github org, do the following steps to get started:

```bash
# clone your fork to your local machine
git clone https://github.com/airbnb/reagent.git
git clone https://github.com/airbnb/enzyme.git

# step into local repo
cd reagent
cd enzyme

# install dependencies (use react:13 if you want to use React 0.13)
npm install && npm run react:14
Expand Down
26 changes: 13 additions & 13 deletions README.md
@@ -1,33 +1,33 @@
Reagent
Enzyme
=======

[![npm Version](https://img.shields.io/npm/v/reagent.svg)](https://www.npmjs.com/package/reagent) [![License](https://img.shields.io/npm/l/reagent.svg)](https://www.npmjs.com/package/reagent) [![Build Status](https://travis-ci.org/airbnb/reagent.svg)](https://travis-ci.org/airbnb/reagent) [![Coverage Status](https://coveralls.io/repos/airbnb/reagent/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/reagent?branch=master)
[![npm Version](https://img.shields.io/npm/v/enzyme.svg)](https://www.npmjs.com/package/enzyme) [![License](https://img.shields.io/npm/l/enzyme.svg)](https://www.npmjs.com/package/enzyme) [![Build Status](https://travis-ci.org/airbnb/enzyme.svg)](https://travis-ci.org/airbnb/enzyme) [![Coverage Status](https://coveralls.io/repos/airbnb/enzyme/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/enzyme?branch=master)

Reagent is a JavaScript Testing utility for React that makes it easier to assert, manipulate,
Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate,
and traverse your React Components' output.

Reagent's API is meant to be intuitive and flexible by mimicking jQuery's API for DOM manipulation
Enzyme's API is meant to be intuitive and flexible by mimicking jQuery's API for DOM manipulation
and traversal.

Reagent is unopinionated regarding which test runner or assertion library you use, and should be
Enzyme is unopinionated regarding which test runner or assertion library you use, and should be
compatible with all major test runners and assertion libraries out there. The documentation and
examples for reagent use [mocha](https://mochajs.org/) and [chai](http://chaijs.com/), but you
examples for enzyme use [mocha](https://mochajs.org/) and [chai](http://chaijs.com/), but you
should be able to extrapolate to your framework of choice.



### [Installation](/docs/installation/README.md)

To get started with reagent, you can simply install it with npm:
To get started with enzyme, you can simply install it with npm:

```bash
npm i --save-dev reagent
npm i --save-dev enzyme
```

Reagent is currently compatible with both `React 0.14.x` and `React 0.13.x`. In order to achieve
Enzyme is currently compatible with both `React 0.14.x` and `React 0.13.x`. In order to achieve
this compatibility, some dependencies cannot be explicitly listed in our `package.json`.

If you are using `React 0.14`, in addition to `reagent`, you will have to ensure that you also
If you are using `React 0.14`, in addition to `enzyme`, you will have to ensure that you also
have the following npm modules installed if they were not already:

```bash
Expand All @@ -42,7 +42,7 @@ Basic Usage
## [Shallow Rendering](/docs/api/shallow.md)

```jsx
import { shallow } from 'reagent';
import { shallow } from 'enzyme';

describe('<MyComponent />', () => {

Expand Down Expand Up @@ -88,7 +88,7 @@ import {
describeWithDOM,
mount,
spyLifecycle,
} from 'reagent';
} from 'enzyme';

describeWithDOM('<Foo />', () => {

Expand Down Expand Up @@ -123,7 +123,7 @@ Read the full [API Documentation](/docs/api/mount.md)
## [Static Rendered Markup](/docs/api/render.md)

```jsx
import { render } from 'reagent';
import { render } from 'enzyme';

describe('<Foo />', () => {

Expand Down
6 changes: 3 additions & 3 deletions book.json
@@ -1,6 +1,6 @@
{
"gitbook": "2.4.3",
"title": "Reagent",
"title": "Enzyme",
"description": "React Testing",
"structure": {
"summary": "docs/README.md",
Expand All @@ -18,11 +18,11 @@
],
"pluginsConfig": {
"edit-link": {
"base": "https://github.com/airbnb/reagent/tree/master",
"base": "https://github.com/airbnb/enzyme/tree/master",
"label": "Edit This Page"
},
"github": {
"url": "https://github.com/airbnb/reagent/"
"url": "https://github.com/airbnb/enzyme/"
}
}
}
6 changes: 3 additions & 3 deletions docs/GLOSSARY.md
@@ -1,12 +1,12 @@
# selector

A Selector in reagent is similar to a CSS selector, but can be a number of other things as well in
order to easily specify a criteria by which you want to find nodes in a reagent wrapper. See the
A Selector in enzyme is similar to a CSS selector, but can be a number of other things as well in
order to easily specify a criteria by which you want to find nodes in a enzyme wrapper. See the
Selector page for more information.

# wrapper

A wrapper refers to the reagent wrapper class that provides the API.
A wrapper refers to the enzyme wrapper class that provides the API.


# predicate
Expand Down
6 changes: 3 additions & 3 deletions docs/api/README.md
Expand Up @@ -5,7 +5,7 @@
### [Shallow Rendering](shallow.md)

```jsx
import { shallow } from 'reagent';
import { shallow } from 'enzyme';

const wrapper = shallow(<MyComponent />);
// ...
Expand All @@ -15,7 +15,7 @@ const wrapper = shallow(<MyComponent />);
### [Full Rendering](mount.md)

```jsx
import { mount } from 'reagent';
import { mount } from 'enzyme';

const wrapper = mount(<MyComponent />);
// ...
Expand All @@ -25,7 +25,7 @@ const wrapper = mount(<MyComponent />);
### [Static Rendering](render.md)

```jsx
import { render } from 'reagent';
import { render } from 'enzyme';

const wrapper = render(<MyComponent />);
// ...
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/children.md
Expand Up @@ -6,7 +6,7 @@ selector can be provided and it will filter the children by this selector

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md) [optional]): A selector to filter the children by.
1. `selector` ([`EnzymeSelector`](../selector.md) [optional]): A selector to filter the children by.


#### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/every.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not all of the nodes in the wrapper match the provided select

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/filter.md
Expand Up @@ -5,7 +5,7 @@ Returns a new wrapper with only the nodes of the current wrapper that match the

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/find.md
Expand Up @@ -5,7 +5,7 @@ Finds every node in the render tree of the current wrapper that matches the prov

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/is.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not the current node matches a provided selector.

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/not.md
Expand Up @@ -8,7 +8,7 @@ This method is effectively the negation or inverse of [`filter`](filter.md).

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/parents.md
Expand Up @@ -9,7 +9,7 @@ Note: can only be called on a wrapper of a single node.

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md) [optional]): The selector to filter the parents by.
1. `selector` ([`EnzymeSelector`](../selector.md) [optional]): The selector to filter the parents by.


#### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/some.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not any of the nodes in the wrapper match the provided select

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/text.md
Expand Up @@ -2,7 +2,7 @@

Returns a string of the rendered text of the current render tree. This function should be
looked at with skepticism if being used to test what the actual HTML output of the component
will be. If that is what you would like to test, use reagent's `render` function instead.
will be. If that is what you would like to test, use enzyme's `render` function instead.

Note: can only be called on a wrapper of a single node.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/children.md
Expand Up @@ -6,7 +6,7 @@ selector can be provided and it will filter the children by this selector

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md) [optional]): A selector to filter the children by.
1. `selector` ([`EnzymeSelector`](../selector.md) [optional]): A selector to filter the children by.


#### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/every.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not all of the nodes in the wrapper match the provided select

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/filter.md
Expand Up @@ -5,7 +5,7 @@ Returns a new wrapper with only the nodes of the current wrapper that match the

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/find.md
Expand Up @@ -5,7 +5,7 @@ Finds every node in the render tree of the current wrapper that matches the prov

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/is.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not the current node matches a provided selector.

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/not.md
Expand Up @@ -8,7 +8,7 @@ This method is effectively the negation or inverse of [`filter`](filter.md).

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/parents.md
Expand Up @@ -9,7 +9,7 @@ Note: can only be called on a wrapper of a single node.

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md) [optional]): The selector to filter the parents by.
1. `selector` ([`EnzymeSelector`](../selector.md) [optional]): The selector to filter the parents by.


#### Returns
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/some.md
Expand Up @@ -5,7 +5,7 @@ Returns whether or not any of the nodes in the wrapper match the provided select

#### Arguments

1. `selector` ([`ReagentSelector`](../selector.md)): The selector to match.
1. `selector` ([`EnzymeSelector`](../selector.md)): The selector to match.



Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/text.md
Expand Up @@ -2,7 +2,7 @@

Returns a string of the rendered text of the current render tree. This function should be
looked at with skepticism if being used to test what the actual HTML output of the component
will be. If that is what you would like to test, use reagent's `render` function instead.
will be. If that is what you would like to test, use enzyme's `render` function instead.

Note: can only be called on a wrapper of a single node.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/mount.md
Expand Up @@ -8,7 +8,7 @@ Full DOM rendering depends on a library called [jsdom](https://github.com/tmpva
essentially a headless browser implemented completely in JS.

```jsx
import { mount } from 'reagent';
import { mount } from 'enzyme';

describe('<Foo />', () => {

Expand Down
6 changes: 3 additions & 3 deletions docs/api/render.md
@@ -1,9 +1,9 @@
# Static Rendering API

Reagent's `render` function is used to render react components to static HTML and analyze the
Enzyme's `render` function is used to render react components to static HTML and analyze the
resulting HTML structure.

`render` returns a wrapper very similar to the other renderers in reagent, [`mount`](mount.md) and
`render` returns a wrapper very similar to the other renderers in enzyme, [`mount`](mount.md) and
[`shallow`](shallow.md); however, `render` uses a third party HTML parsing and traversal library
[Cheerio](http://cheeriojs.github.io/cheerio/). We believe that Cheerio handles parsing and
traversing HTML extremely well, and duplicating this functionality ourselves would be a
Expand All @@ -16,7 +16,7 @@ constructors.
### Example Usage

```jsx
import { render } from 'reagent';
import { render } from 'enzyme';

describe('<Foo />', () => {

Expand Down

0 comments on commit 38ae4b2

Please sign in to comment.