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

[Popover] Add test for getoffset #6510

Merged
merged 2 commits into from Apr 5, 2017

Conversation

agamrafaeli
Copy link
Contributor

@agamrafaeli agamrafaeli commented Apr 5, 2017

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@@ -310,6 +310,8 @@ export default class Popover extends Component {
};
}

handleGetOffsetTop = getOffsetTop;
Copy link
Member

Choose a reason for hiding this comment

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

What about exporting the two functions instead of attaching them to the instance of the component?
I feel like it will be more explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I went this way was that by exporting the functions we are declaring them to be "official" members of the component, in fact they are internal logical routers. From the perspective of writing tests absolutely exporting. From a program interface I think this is the better way to go. No?

@oliviertassinari oliviertassinari added next PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI test and removed PR: Needs Review labels Apr 5, 2017
@oliviertassinari oliviertassinari added PR: Review Accepted and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Apr 5, 2017
@mbrookes mbrookes merged commit ebd8a8e into mui:next Apr 5, 2017
@mbrookes
Copy link
Member

mbrookes commented Apr 5, 2017

@agamrafaeli Thanks once more!

@agamrafaeli agamrafaeli deleted the popover-test-getoffset branch April 23, 2017 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants