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 and refactor #40

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

MichaelCurrin
Copy link
Owner

@MichaelCurrin MichaelCurrin commented Sep 1, 2020

This might be a throwaway branch and PR but the idea was to write the ideal API using tests.

This does mean a long and slow refactor which is only usable when it is merged.

UPDATE: Some of the markdown and repo stuff might still be useful

@MichaelCurrin
Copy link
Owner Author

Maybe I can do this incrementally.

Unfortunately I don't have tests for existing work so I'd have to rely on new tests being good.

@MichaelCurrin MichaelCurrin marked this pull request as draft September 8, 2020 21:53
@MichaelCurrin
Copy link
Owner Author

This can be used as a jest guide too

const { License } = require('../components/license.js')

test('MIT license badge title displays correctly', () => {
var license = new License('MIT')
Copy link
Owner Author

Choose a reason for hiding this comment

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

Here I made License its own object.

This is actually not that important to me - I had the app working fine as is for license.

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

1 participant