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 types to use generics & add a TS test for react-redux #80

Merged
merged 8 commits into from
May 27, 2020

Conversation

kale-stew
Copy link
Contributor

Description

Rel: #69

This PR introduces a test for react-redux's useSelector hook to access state. Ideally, we should also confirm the # of overlapping values to make sure we're using the hook as expected, but I didn't want to get too into the weeds of wrapping another test around this one.

Would appreciate feedback / input on how I can enhance this test.

Checklist:

  • All tests are passing
  • Type definitions, if updated, pass both test-ts-defs and test-ts-usage
  • Benchmark performance has not significantly decreased
  • Bundle size has not been significantly impacted
  • The bundle size badge has been updated to reflect the new size N/A, still at 369

@kale-stew kale-stew requested a review from chrisbolin May 25, 2020 20:18
Copy link
Contributor

@chrisbolin chrisbolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our goal here is to have a failing test, just like #61

test/typescript/sample-usage.tsx Outdated Show resolved Hide resolved
test/typescript/sample-usage.tsx Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
test/typescript/sample-usage.tsx Outdated Show resolved Hide resolved
test/typescript/sample-react-redux-usage.tsx Outdated Show resolved Hide resolved
test/typescript/sample-react-redux-usage.tsx Outdated Show resolved Hide resolved
@kale-stew kale-stew requested a review from chrisbolin May 27, 2020 22:36
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@e01e975). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #80   +/-   ##
=========================================
  Coverage          ?   98.21%           
=========================================
  Files             ?        1           
  Lines             ?       56           
  Branches          ?        0           
=========================================
  Hits              ?       55           
  Misses            ?        1           
  Partials          ?        0           
Impacted Files Coverage Δ
index.js 98.21% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e01e975...4e761cd. Read the comment docs.

Copy link
Contributor

@chrisbolin chrisbolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one thing i missed in my previous review. Also, since i went ahead and corrected the types, we should probably include that in the title of the PR, so we don't forget that we changed the types - a big deal, as it changes the library's API.

test/typescript/sample-react-redux-usage.tsx Outdated Show resolved Hide resolved
@kale-stew kale-stew changed the title Add a test for react-redux's useSelector hook Update types to use generics & add a TS test for react-redux May 27, 2020
@kale-stew kale-stew merged commit 75b679d into master May 27, 2020
@kale-stew kale-stew deleted the tests/react-redux-support branch May 27, 2020 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants