Skip to content

Commit

Permalink
[Docs] fixing typos
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored and ljharb committed Jan 29, 2023
1 parent cc0a6c0 commit 3a7701c
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ lib-cov
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ library from v2 to v3, it is hard to categorize changes in terms of sem

### Documentation

- Update docs to use `prop-types` ([#894](https://github.com/enzymejs/enzyme/pull/894), [#890](https://github.com/enzymejs/enzyme/issue/890))
- Update docs to use `prop-types` ([#894](https://github.com/enzymejs/enzyme/pull/894), [#890](https://github.com/enzymejs/enzyme/issues/890))

## 2.8.1

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Tests for a method "foo" are stored in `packages/enzyme-test-suite/test/shared/m
### Style & Linting

This codebase adheres to the [Airbnb Styleguide](https://github.com/airbnb/javascript) and is
enforced using [ESLint](http://eslint.org/).
enforced using [ESLint](https://eslint.org).

As with the test suite, the linter will not fully pass unless it is running on *built* Enzyme. This is because the ESLint `import/*` rules rely on finding the target files in the filesystem (which won't be there unless they've been built).

Expand Down
2 changes: 1 addition & 1 deletion INTHEWILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Organizations
- [Simple](https://github.com/simplefinance)
- [Grab](https://github.com/grab)
- [Megalytic](https://megalytic.com/)
- [Chroma](http://hichroma.com/)
- [Chroma](https://www.chromatic.com)
- [Mavens](https://github.com/mavens)
- [Cucumber](https://cucumber.io)
- [Genoa Telepsychiatry](https://genoatelepsychiatry.com)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Running Enzyme Tests

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 enzyme use [Mocha](https://mochajs.org/) and [Chai](http://chaijs.com/), but you
examples for enzyme use [Mocha](https://mochajs.org) and [Chai](https://chaijs.com), but you
should be able to extrapolate to your framework of choice.

If you are interested in using enzyme with custom assertions and convenience functions for
Expand Down
2 changes: 1 addition & 1 deletion docs/api/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Full DOM rendering is ideal for use cases where you have components that may int
Full DOM rendering requires that a full DOM API be available at the global scope. This means that
it must be run in an environment that at least “looks like” a browser environment. If you do not
want to run your tests inside of a browser, the recommended approach to using `mount` is to depend
on a library called [jsdom](https://github.com/tmpvar/jsdom) which is essentially a headless browser
on a library called [jsdom](https://github.com/jsdom/jsdom) which is essentially a headless browser
implemented completely in JS.

**Note**: unlike shallow or static rendering, full rendering actually mounts the component in the DOM, which means that tests can affect each other if they are all using the same DOM. Keep that in mind while writing your tests and, if necessary, use [`.unmount()`](ReactWrapper/unmount.md) or something similar as cleanup.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/render.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Use enzyme's `render` function to generate HTML from your React tree, and analyz

`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
[Cheerio](https://cheerio.js.org). We believe that Cheerio handles parsing and
traversing HTML extremely well, and duplicating this functionality ourselves would be a
disservice.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/browserify.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Using enzyme with Browserify

If you are using a test runner that runs code in a browser-based environment, you may be using
[browserify](http://browserify.org/) in order to bundle your React code.
[browserify](https://browserify.org) in order to bundle your React code.

Prior to enzyme 3.0 there were some issues with conditional requires that were used
to maintain backwards compatibility with React versions. With enzyme 3.0+, this
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/jest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Configure with Jest

To run the setup file to configure Enzyme and the Adapter (as shown in the [Installation docs](https://enzymejs.github.io/enzyme/docs/installation/)) with Jest, set `setupFilesAfterEnv` (previously `setupTestFrameworkScriptFile`) in your config file (check [Jest's documentation](http://jestjs.io/docs/en/configuration) for the possible locations of that config file) to literally the string `<rootDir>` and the path to your setup file.
To run the setup file to configure Enzyme and the Adapter (as shown in the [Installation docs](https://enzymejs.github.io/enzyme/docs/installation/)) with Jest, set `setupFilesAfterEnv` (previously `setupTestFrameworkScriptFile`) in your config file (check [Jest's documentation](https://jestjs.io/docs/en/configuration) for the possible locations of that config file) to literally the string `<rootDir>` and the path to your setup file.

```json
{
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/jsdom.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using enzyme with JSDOM

[JSDOM](https://github.com/tmpvar/jsdom) is a JavaScript based headless browser that can be used to create a realistic testing environment.
[JSDOM](https://github.com/jsdom/jsdom) is a JavaScript based headless browser that can be used to create a realistic testing environment.

Since enzyme's [`mount`](../api/mount.md) API requires a DOM, JSDOM is required in order to use
`mount` if you are not already in a browser environment (ie, a Node environment).
Expand Down Expand Up @@ -42,7 +42,7 @@ global.cancelAnimationFrame = function (id) {
copyProps(window, global);
```

Here is the sample of [jsdom old API](https://github.com/tmpvar/jsdom/blob/master/lib/old-api.md) as well.
Here is the sample of [jsdom old API](https://github.com/jsdom/jsdom/blob/11.0.0/lib/old-api.md) as well.

`jsdom ~<v10`:

Expand Down Expand Up @@ -108,7 +108,7 @@ may want to try using a browser-based test runner such as [Karma](../guides/karm
Some times you may need to switch between different versions of node, you can use a CLI tool called
`nvm` to quickly switch between node versions.

To install `nvm`, use the curl script from http://nvm.sh, and then:
To install `nvm`, use the curl script from https://nvm.sh, and then:

```bash
nvm install 4
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/migration-from-2-to-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ console.log(wrapper.find('.bar').length); // 2

Since `<Foo/>` has the className `bar` it is returned as the _hostNode_. As expected the `<div>` with the className `bar` is also returned

To avoid this you can explicity query for the DOM node: `wrapper.find('div.bar')`. Alternatively if you would like to only find host nodes use [hostNodes()](https://enzymejs.github.io/enzyme/docs/api/ShallowWrapper/hostNodes.html)
To avoid this you can explicitly query for the DOM node: `wrapper.find('div.bar')`. Alternatively if you would like to only find host nodes use [hostNodes()](https://enzymejs.github.io/enzyme/docs/api/ShallowWrapper/hostNodes.html)

## For `mount`, updates are sometimes required when they weren't before

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/react-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Enzyme.configure({ adapter: new Adapter() });
To use enzyme's `mount` until a React Native adapter exists, an emulated DOM must be loaded.

While some have had success with [react-native-mock-renderer](https://github.com/Root-App/react-native-mock-render),
the recommended approach is to use [https://github.com/tmpvar/jsdom](JSDOM),
the recommended approach is to use [JSDOM](https://github.com/jsdom/jsdom),
as documented for enzyme at the [JSDOM](https://enzymejs.github.io/enzyme/docs/guides/jsdom.html) documentation page.

JSDOM will allow all of the `enzyme` behavior you would expect. While Jest snapshot testing can be used with
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-test-suite/test/ReactWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ describeWithDOM('mount', () => {
const p = wrapper.find('p');
expect(wrapper.find('p').text()).to.equal('0');
wrapper.find(Child).prop('onClick')();
// TOOD: this is a difference between mount and shallow
// TODO: this is a difference between mount and shallow
// this is 1, because the wrapper has updated
expect(p.text()).to.equal('1');
expect(wrapper.find('p').text()).to.equal('1');
Expand Down
4 changes: 2 additions & 2 deletions packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ describe('shallow', () => {
))).to.throw('FaultyFooProvider.getChildContext(): key "foo" is not defined in childContextTypes');
});

it('allows overridding context with the context option', () => {
it('allows overriding context with the context option', () => {
const wrapper = shallow(<TestComponent />);

const fooProvider = wrapper.find(FooProvider).dive();
Expand Down Expand Up @@ -2521,7 +2521,7 @@ describe('shallow', () => {
const p = wrapper.find('p');
expect(wrapper.find('p').text()).to.equal('0');
wrapper.find(Child).prop('onClick')();
// TOOD: this is a difference between mount and shallow
// TODO: this is a difference between mount and shallow
// this is still 0 because the wrapper won't be updated
expect(p.text()).to.equal('0');
expect(wrapper.find('p').text()).to.equal('1');
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme-test-suite/test/Utils-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ describe('Utils', () => {
});
});

it('returns false when it recieves any other value than "false" or null', () => {
it('returns false when it receives any other value than "false" or null', () => {
const values = [undefined, true, 'test', []];

values.forEach((value) => {
Expand Down

0 comments on commit 3a7701c

Please sign in to comment.