VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
531 stars 125 forks source link

Cookbook: tests with munit #322

Open romanowski opened 2 years ago

romanowski commented 2 years ago

A short cookbooks that will show how to define tests using MUnit. I should cover 2 different test files and test utils.

An example test using Munit

mtk commented 2 years ago

i'm going to sign up for this for the april 12th spree so i can learn munit. can you provide more detail?

anatoliykmetyuk commented 2 years ago

This issue was picked for the Issue Spree #14 of 12th April which takes place in a week from now. @tgodzik, @mtk and @anatoliykmetyuk will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

lwronski commented 2 years ago

Hi @mtk,

I think it should describe how to use munit with Scala CLI. For example, you can prepare some basic Scala scripts and then add some tests in munit.

Additionally, cookbook should describe how to define test and run them - you can find more info here.

tgodzik commented 2 years ago

We added a quick example in https://github.com/VirtusLab/scala-cli/compare/main...tgodzik:munit-cookbook?expand=1

We would need to iterate a bit more to figure out if there would be any other nice things to show.