Skip to content

Add tutorials about MUnit in the Scala Toolkit #8

@adpi2

Description

@adpi2

Scala Center Spree - 14 Nov 2022

Setting Up

  1. Add this fork as a remote of your scala/docs.scala-lang clone
git remote add scalacenter git@github.com:scalacenter/docs.scala-lang.git
  1. Fetch the toolkit branch
git fetch scalacenter toolkit
  1. Pick the topic of the tutorial you are going to write
  2. Checkout to your own new branch on toolkit
git checkout -b munit-my-topic scalacenter/toolkit
  1. Write the tutorial
  2. Open a PR from your branch to the toolkit branch in this fork

Topics of the tutorials

The current content of the toolkit branch can be seen here.

It contains the layout of the following tutorials:

  • How to write and run a test suite (on the JVM)
  • How to write assertions
  • How to test exceptions
  • How to run a single test
  • How to use clues to get better test report
  • How to write asynchronous tests
  • How to managed the resources of a test
  • How to deal with flaky test
  • How to use assumption to skip some tests

The following tutorials are missing:

  • How to write and run a test suite with Scala.js
  • How to run a test from Metals and IntelliJ
  • How to write property-based tests
  • How to measure test coverage

Guidelines

  • Use You instead of We to write the tutorials. Use the present tense.
  • The tutorial should start with the Installing dropdown
  • The tutorial should be short and solve one specific problem
  • It's okay to redirect to the library documentation for the user to get more details
  • We use tabs to describe solutions on different build tools: Scala CLI, sbt, Mill (in that order)

Troubleshooting

If you have trouble to build the website, you can try:

  1. To remove the .jekyll-cache .jekyll-metadata and _site folder
sudo rm -Rf .jekyll-cache .jekyll-metadata _site
  1. Re-build and run the dockerfile
env UID="$(id -u)" GID="$(id -g)" docker-compose up --build

The local URL of the toolkit tutorials is localhost:4000/toolkit/introduction.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions