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 tests for BaseService + fix hex colors #1581

Merged
merged 2 commits into from
Mar 20, 2018
Merged

Conversation

paulmelnikow
Copy link
Member

@paulmelnikow paulmelnikow commented Mar 19, 2018

Breaking invokeHandler into its own function makes it easy to test the error handling, and also to expand the error handling as I've done in this WIP branch: master...paulmelnikow:rewrite-npm-typedefs

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1581 March 19, 2018 02:16 Inactive
@shields-ci
Copy link

shields-ci commented Mar 19, 2018

Messages
📖

✨ Thanks for your contribution to Shields, @paulmelnikow!

Generated by 🚫 dangerJS

@paulmelnikow paulmelnikow requested a review from chris48s March 19, 2018 02:18
@paulmelnikow paulmelnikow added the core Server, BaseService, GitHub auth, Shared helpers label Mar 19, 2018
@paulmelnikow
Copy link
Member Author

After this lands I'll open a PR to handle query parameters in BaseService. It'll conflict if I do it now.

@paulmelnikow paulmelnikow added the bug Bugs in badges and the frontend label Mar 20, 2018
@paulmelnikow paulmelnikow changed the title Add tests for BaseService Add tests for BaseService + fix colors Mar 20, 2018
@paulmelnikow paulmelnikow changed the title Add tests for BaseService + fix colors Add tests for BaseService + fix hex colors Mar 20, 2018
Copy link
Member

@chris48s chris48s left a comment

Choose a reason for hiding this comment

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

Looks good 👍

return await this.handle(namedParams);
} catch (error) {
console.log(error);
return { message: 'error' };
Copy link
Member

Choose a reason for hiding this comment

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

Lets not scope creep this PR. I think this is fine for refactoring + adding tests but an improvement we should make here soon is the ability to customise this error based on the exception.

@paulmelnikow
Copy link
Member Author

Thanks for reviewing!

@paulmelnikow paulmelnikow merged commit 71ef474 into master Mar 20, 2018
@paulmelnikow paulmelnikow deleted the base-service-tests branch March 20, 2018 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants