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

Add callback assert #186

Merged
merged 1 commit into from
Feb 4, 2020
Merged

Conversation

cristianooliveira
Copy link
Contributor

@cristianooliveira cristianooliveira commented Feb 4, 2020

Description

Add callback assert.
This assert adds more context to the callback error as suggested by @franciscocardoso.

Steps to reproduce or test

When:

Assert.callback(() => {});

The error should be:

{
  "__class__": "Callback",
  "__parentClass__": "Assert"
}

Now when:

Assert.callback(() => {}, 'CustomClass');
{
  "__class__": "CustomClass",
  "__parentClass__": "Assert"
}

Checklist

  • Commits are atomic and logically separated.
  • Performance implications have been considered.
  • Security implications have been considered.
  • Local tests run successfully and the new code has good coverage.

@cristianooliveira cristianooliveira self-assigned this Feb 4, 2020
@cristianooliveira cristianooliveira changed the title Add callback assert to V4 Add callback assert Feb 4, 2020
@cristianooliveira cristianooliveira force-pushed the feature/add-callback-assert branch from b95affc to e190e36 Compare February 4, 2020 15:39
@cristianooliveira cristianooliveira force-pushed the feature/add-callback-assert branch from e190e36 to c1ae7d9 Compare February 4, 2020 15:40
@franciscocardoso franciscocardoso merged commit 97afd12 into master Feb 4, 2020
@franciscocardoso franciscocardoso deleted the feature/add-callback-assert branch February 4, 2020 15:59
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