bdebon / choiceof.dev

Developers have to cope with pretty hard choices every day. This is a collection of the most complex and funny choices. What will be yours?
https://choiceof.dev
GNU General Public License v3.0
473 stars 93 forks source link

[test] Improve question list validation #114

Closed Drarig29 closed 1 year ago

Drarig29 commented 1 year ago

What this PR is about?

This PR improves the validation that was only done on the img_path property. I've started to see PRs with wrong slugs, that's why I had the idea to validate them: they must be lowercase, with only alphanumeric characters and em dashes (no underscore or uppercase letter).

I also added validation for the left/right choice's titles, so that the text is always perfectly centered.

It also fixes some typos and inconsistencies.

Tests

Clean Code

bdebon commented 1 year ago

:tada: This PR is included in version 1.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: