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

[TypeScript] Is there a cleaner way to assert that we are working with a SocialProfile in tests? #6

Open
beefchimi opened this issue Jan 16, 2022 · 0 comments
Labels
🧐 Question Further information is requested

Comments

@beefchimi
Copy link
Owner

For all of our networks > tests, we have to use a typecast to assert what parseProfile is returning:

const {id, user} = mockSocialite.parseProfile(mockCommonUrl) as SocialProfile;

It would be great if we could somehow solve this from our mock:

// Calling `parseProfile()` will return a `SocialProfile`
const mockSocialite = new Socialite(allSocialNetworks);
@beefchimi beefchimi added the 🧐 Question Further information is requested label Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧐 Question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant