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

Fixes #9 #10

Merged
merged 4 commits into from Nov 5, 2014

Conversation

Projects
None yet
4 participants
@dminkovsky
Contributor

dminkovsky commented Sep 15, 2014

Added some tests. Perhaps they are too much?

@wraithgar

This comment has been minimized.

Show comment
Hide comment
@wraithgar

wraithgar Sep 16, 2014

Member

Probably should have an if (cb) conditional like the other calls to cb.

Member

wraithgar commented Sep 16, 2014

Probably should have an if (cb) conditional like the other calls to cb.

@dminkovsky

This comment has been minimized.

Show comment
Hide comment
@dminkovsky

dminkovsky Sep 16, 2014

Contributor

That code path comes via

this._hide(prev, function () {
, so the cb is passed in and mandatory (async)

Contributor

dminkovsky commented Sep 16, 2014

That code path comes via

this._hide(prev, function () {
, so the cb is passed in and mandatory (async)

@wraithgar

This comment has been minimized.

Show comment
Hide comment
@wraithgar

wraithgar Sep 16, 2014

Member

If waitForRemove is falsey _hide is called sans callback

Member

wraithgar commented Sep 16, 2014

If waitForRemove is falsey _hide is called sans callback

@dminkovsky

This comment has been minimized.

Show comment
Hide comment
@dminkovsky

dminkovsky Sep 16, 2014

Contributor

Yeah, you're right. If customHide has length === 3 even though waitForRemove is false in the config, hide() is called without the cb and then it'll fail. I'll add the if (), thanks.

Contributor

dminkovsky commented Sep 16, 2014

Yeah, you're right. If customHide has length === 3 even though waitForRemove is false in the config, hide() is called without the cb and then it'll fail. I'll add the if (), thanks.

@wraithgar

This comment has been minimized.

Show comment
Hide comment
@wraithgar

wraithgar Sep 16, 2014

Member

code looks good, the tests read more like you're enforcing things under the hood rather than expected overarching behavior (i.e. how many parameters hide gets?)

Member

wraithgar commented Sep 16, 2014

code looks good, the tests read more like you're enforcing things under the hood rather than expected overarching behavior (i.e. how many parameters hide gets?)

@dminkovsky

This comment has been minimized.

Show comment
Hide comment
@dminkovsky

dminkovsky Sep 17, 2014

Contributor

@wraithgar Thanks for your feedback. What do you think now? The changes I made test the public API, which to me includes the params that your passed-in functions get. So I am testing that options.hide gets first the previous view, then the current view. And the expected behavior.

Contributor

dminkovsky commented Sep 17, 2014

@wraithgar Thanks for your feedback. What do you think now? The changes I made test the public API, which to me includes the params that your passed-in functions get. So I am testing that options.hide gets first the previous view, then the current view. And the expected behavior.

@dminkovsky

This comment has been minimized.

Show comment
Hide comment
@dminkovsky

dminkovsky Sep 17, 2014

Owner

Added this to have a bit less repetition in the setups.

Owner

dminkovsky commented on test/main.js in 525fc04 Sep 17, 2014

Added this to have a bit less repetition in the setups.

@dminkovsky

This comment has been minimized.

Show comment
Hide comment
@dminkovsky

dminkovsky Sep 17, 2014

Owner

Added this test because it didn't fail, even before the proposed code change in the next commit.

Owner

dminkovsky commented on test/main.js in 1b8f02c Sep 17, 2014

Added this test because it didn't fail, even before the proposed code change in the next commit.

@wraithgar

This comment has been minimized.

Show comment
Hide comment
@wraithgar

wraithgar Sep 17, 2014

Member

lgtm

Member

wraithgar commented Sep 17, 2014

lgtm

@latentflip

This comment has been minimized.

Show comment
Hide comment
@latentflip

latentflip Nov 5, 2014

Contributor

Okay, given that there's another pull request for this already with the same implementation and no tests, and we're seeing reported issues for this in gitter, I think we should merge asap. I have the pull request updated to the latest master with fixed merge commits and passing tests, shall I do it?

Contributor

latentflip commented Nov 5, 2014

Okay, given that there's another pull request for this already with the same implementation and no tests, and we're seeing reported issues for this in gitter, I think we should merge asap. I have the pull request updated to the latest master with fixed merge commits and passing tests, shall I do it?

@latentflip latentflip merged commit 763f584 into AmpersandJS:master Nov 5, 2014

@latentflip

This comment has been minimized.

Show comment
Hide comment
@latentflip

latentflip Nov 5, 2014

Contributor

Merged, thanks @dminkovsky and sorry for the delay!

Contributor

latentflip commented Nov 5, 2014

Merged, thanks @dminkovsky and sorry for the delay!

@latentflip

This comment has been minimized.

Show comment
Hide comment
@latentflip

latentflip Nov 5, 2014

Contributor

Released as 1.1.2

Contributor

latentflip commented Nov 5, 2014

Released as 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment