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

Moar attribute tests #10509

Merged
merged 11 commits into from
Sep 5, 2017
Merged

Moar attribute tests #10509

merged 11 commits into from
Sep 5, 2017

Commits on Sep 2, 2017

  1. WIP

    acdlite authored and flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    ce88037 View commit details
    Browse the repository at this point in the history
  2. WIP Add the rest of the tests for what we expect re: unknown attributes

    **what is the change?:**
    Adds tests for the following behavior -
    
    - Numbers and booleans should be converted to strings, and not warn
    - NaN, Symbols, functions, and objects should be converted to strings,
      and *should* warn
    
    Going to add tests for the not-warning behavior in a follow-up.
    
    These tests are not entirely passing - we either need to change what we
    expect or change the behavior.
    
    **why make this change?:**
    Gets everyone on the same page about expected behavior, and codifies it
    in a maintainable way
    
    **test plan:**
    `yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`
    
    **issue:**
    facebook#10399
    flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    41e3ef1 View commit details
    Browse the repository at this point in the history
  3. WIP Add check that we *don't* warn when handling some unknown attributes

    **what is the change?:**
    We are testing the behavior of unknown attributes, which has changed
    since React 15.
    
    We want to *not* warn for the following cases -
    - null
    - undefined
    - missing
    - strings
    - numbers
    - booleans
    
    **why make this change?:**
    We want to verify that warnings don't get fired at the wrong time.
    
    **test plan:**
    `yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`
    
    **issue:**
    facebook#10399
    flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    6b778cc View commit details
    Browse the repository at this point in the history
  4. ran prettier

    flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    706118e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b94b5b7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0464fd5 View commit details
    Browse the repository at this point in the history
  7. Remove Markdown from test names

    I don't think we use this convention anywhere.
    gaearon authored and flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    acae10d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ce03f1e View commit details
    Browse the repository at this point in the history
  9. Update ReactDOMAttribute test based on attribute fixture

    **what is the change?:**
    - booleans don't get stringified
    - some warnings have changed since we originally wrote this
    
    **why make this change?:**
    The attribute behavior is finalized and now we can test it :D
    
    I also found it handy to have a row with a truly unknown attribute, so
    added "imaginaryFriend".
    
    **test plan:**
    `yarn test src/renderers/dom/shared/__tests__/ReactDOMAttribute-test.js`
    and comparing the tests to the attribute table
    
    **issue:**
    facebook#10399
    flarnie committed Sep 2, 2017
    Configuration menu
    Copy the full SHA
    2fd8a5d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b88b1d1 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2017

  1. ran prettier

    flarnie committed Sep 5, 2017
    Configuration menu
    Copy the full SHA
    083f47f View commit details
    Browse the repository at this point in the history