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

Throw if performFn is valid but callback is not #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NealEhardt
Copy link

Add error checking for the following scenario:

actor.perform('action-name', function () {}, 'INVALID CALLBACK');

});

actor.after('no-functions', function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you also want to make the same change you made to the actor.before statement above.

Copy link
Author

Choose a reason for hiding this comment

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

If you look at the file after changes, I deleted actor.after and modified actor.before. I think actor.after is redundant in this case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not redundant. It's an additional assertion that should never be hit: after hooks should not be executed. If they are it's a bug.

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.

2 participants