Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for test utils add ons change #9331

Closed

Commits on Apr 4, 2017

  1. react-addons-test-utils -> react-dom/test-utils

    Updating all references and docs on the `React.addons.TestUtils` and the
    shallow renderer to refer to the correct targets.
    
    Instead of:
    ```
    const React = require('react');
    
    // ...
    React.addons.Testutils
    // or
    
    const ReactTestUtils = require('react-addons-test-utils');
    ```
    we now show:
    ```
    const ReactTestUtils = require('react-dom/test-utils');
    ```
    
    And for shallow renderer, instead of:
    ```
    const shallowRenderer = TestUtils.createRenderer();
    ```
    
    we now show:
    ```
    const shallowRenderer = require('react-test-renderer/shallow');
    ```
    flarnie committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    7961abd View commit details
    Browse the repository at this point in the history
  2. Update the 'prev' and 'next' attributes of 'add-ons' docs

    These flags are used to set arrow links to easily navigate through the
    documents. They were wrong or missing in some of the 'add-ons' pages and
    this bothered me when manually testing the updates from the previous
    commit.
    flarnie committed Apr 4, 2017
    Configuration menu
    Copy the full SHA
    505893b View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2017

  1. Update syntax for instantiating shallow renderer

    Missed this when updating the docs for the changes to shallow-renderer
    in React 15.5.
    flarnie committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    b280771 View commit details
    Browse the repository at this point in the history
  2. Fix pointers in addons docs

    Thanks @bvaughn for catching this
    flarnie committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    b1d522f View commit details
    Browse the repository at this point in the history
  3. Make example of shallow renderer more consistent

    We should show using the same variable names between code samples.
    flarnie committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    3421294 View commit details
    Browse the repository at this point in the history
  4. Make names in example even more consistent

    We should use the same variable name for the same thing across examples.
    `renderer` -> `shallowRenderer`.
    flarnie committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    cea1fe9 View commit details
    Browse the repository at this point in the history