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

Ability to use mocks as arguments #254 #256

Closed
wants to merge 2 commits into from

Conversation

parisholley
Copy link
Contributor

@parisholley parisholley commented Aug 27, 2021

fix for #254

NiGhTTraX added a commit that referenced this pull request Aug 28, 2021
@NiGhTTraX
Copy link
Owner

Hey @parisholley. There's already support for "special/internal" prop expectaions in BaseRepository:

switch (property) {
case 'toString':
return { value: () => 'mock' };
case '@@toStringTag':
case Symbol.toStringTag:
case 'name':
return { value: 'mock' };
// pretty-format
case '$$typeof':
case 'constructor':
case '@@__IMMUTABLE_ITERABLE__@@':
case '@@__IMMUTABLE_RECORD__@@':
return { value: null };

Doing it this way allows the user to set their own expectations on those properties if they want to. Version 7.1.2 contains the fix.

@NiGhTTraX NiGhTTraX closed this Aug 28, 2021
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.

None yet

2 participants