lsug / lsug-website

Source code of the London Scala User Group Website (yet to be hosted)
GNU General Public License v3.0
3 stars 20 forks source link

Add law tests to the parser #25

Closed zainab-ali closed 3 years ago

zainab-ali commented 3 years ago

The lsug markup uses an applicative parser. It has cats type class instances for functor and alternative. While the parser is unit tested, the instances themselves could use law tests.

Potential Solution

As we use munit for unit testing, we can add laws with discipline-munit. This is described in the cats laws documentation. The tests should be added in the lsug.markup.ParserSpec. Provided there are no test failures, the parser shouldn't be changed.

Prerequisites

You should be familiar with the some type classes, such as Functor. You should also understand the concept of unit testing.

What you'll learn

kxa14 commented 3 years ago

I'm working on this.

zainab-ali commented 3 years ago

Thanks for working on this @kxa14 !