Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gabriele Petronella
    @gabro
    Sweet!
    Ólafur Páll Geirsson
    @olafurpg

    I opened a PR with two fairly big changes scalameta/munit#225

    • By default, drop subtyping constraint on assertEquals() so that it's never a compile-error to compare unrelated types
    • Introduce optional "strict compare" mode, that gives users full control over compile-time + runtime equality (for example, makes it possible to integrate with cats.Eq[A, B])

    Any feedback is welcome!

    cc/ @LukaJCB I recall you asked about something like this before
    Luka Jacobowitz
    @LukaJCB
    ah, that’s amazing, thank you! 👏🏼
    Julien Richard-Foy
    @julienrf

    Hello! When we use junit-interface to run JUnit tests there some options we can pass to configure the output: https://github.com/sbt/junit-interface#junit-interface

    Test / testOptions += Tests.Argument(TestFrameworks.JUnit, "-n")

    Are there equivalent options with MUnit? More specifically, I’m looking for a way to disable color codes in the output.

    Ólafur Páll Geirsson
    @olafurpg
    @julienrf the MUnit command-line parser is a fork of sbt/junit-interface so most of the options should work the same way
    val MUnit = new TestFrameworkd("munit.Framework")
    Test / testOptions += Tests.Argument(MUnit, "-n")
    Julien Richard-Foy
    @julienrf
    Thanks
    Ólafur Páll Geirsson
    @olafurpg
    However, I recall having some issues removing all colors, I can't remember the exact details
    feel free to report an issue if something doesn't work as expected
    the website is missing documentation on all of the available cli options. I never liked the cryptic single character flags like -n, I always wanted to "clean things up" but never got around to it
    but the current options will always continue to work, there are no plans to introduce breaking changes here
    Julien Richard-Foy
    @julienrf
    Thank you for your detailed answer
    Gabriel Volpe
    @gvolpe
    Not sure what you're talking about @hmf , what syntax?
    Gabriel Volpe
    @gvolpe
    Huh? 🤔 The Internet is a funny place...
    Gabriel Volpe
    @gvolpe
    And what made you think I wanted an unsolicited response to that old message from a few months ago? @hmf :laughing: Glad it works now, though. That wasn't the case in 0.7.3... The Internet really is a funny place :smile:
    Michael Pilquist
    @mpilquist
    @olafurpg any chance of a 3.0.0-M1 release today?
    Tomasz Godzik
    @tgodzik
    I can take a look. We need it for the Metals release anyway.
    Michael Pilquist
    @mpilquist
    :+1:
    Tomasz Godzik
    @tgodzik
    Michael Pilquist
    @mpilquist
    @tgodzik Thanks for doing the release. Looks like we're missing a module -- this gives a 404: https://repo1.maven.org/maven2/org/scalameta/munit-scalacheck_sjs1_3.0.0-M1/0.7.16/munit-scalacheck_sjs1_3.0.0-M1-0.7.16.pom
    OK I see the issue in build.sbt, PR incoming
    Tomasz Godzik
    @tgodzik
    it looks like it was never really released
    Michael Pilquist
    @mpilquist
    yeah, it's b/c sharedJsSettings only configured scala2
    should be: crossScalaVersions := allScalaVersions.filterNot(_.startsWith("0.")),
    Tomasz Godzik
    @tgodzik
    ach, good catch. We can follow up with a new release then
    Michael Pilquist
    @mpilquist
    now i'm getting this though:
    [error] stack trace is suppressed; run last munitJS / update for the full output
    [error] (munitJS / update) sbt.librarymanagement.ResolveException: Error downloading org.scala-js:scalajs-test-interface_3.0.0-M1:1.3.0
    [error]   Not found
    [error]   Not found
    [error]   not found: /Users/mpilquist/.ivy2/local/org.scala-js/scalajs-test-interface_3.0.0-M1/1.3.0/ivys/ivy.xml
    [error]   not found: https://repo1.maven.org/maven2/org/scala-js/scalajs-test-interface_3.0.0-M1/1.3.0/scalajs-test-interface_3.0.0-M1-1.3.0.pom
    oh i know how to fix that
    ok let's hope this PR builds successfully: scalameta/munit#243
    Tomasz Godzik
    @tgodzik
    looks good, just scalafmt is showing up as failing
    @mpilquist scalacheck_sjs seems to be not available for 3.0.0 either
    Michael Pilquist
    @mpilquist
    Hm it should be
    Tomasz Godzik
    @tgodzik
    Michael Pilquist
    @mpilquist
    yeah ok, lars said we need typelevel/scalacheck#705 merged first and then that can be fixed
    Tomasz Godzik
    @tgodzik
    ok, let me know if I can help
    objektwerks
    @objektwerks
    Is Scala 3.0.0-M1 support provided by MUnit 0.7.16? The Getting Started page states it is --- yet I get this error for the simplest munit test possible: no implicit argument of type munit.Location TIA!
    The munit test is here: https://github.com/objektwerks/scala3/blob/master/src/test/scala/objektwerks/Test.scala
    Michael Pilquist
    @mpilquist
    yes and i've used successfully so far in both ip4s and scodec-bits
    looks like you need to remove the .withDottyCompat
    objektwerks
    @objektwerks
    Ok. I'll remove it.
    You're a genius, Michael.:) Thanks! It works now. Good grief. I've been struggling with ScalaTest all day; and just moved to MUnit.
    Michael Pilquist
    @mpilquist
    ha, no, just been down the same roads ;)
    objektwerks
    @objektwerks
    In a basic Scala3 project using Munit, I now have 2 unit test classes. And I've noticed this curious console output:
    objektwerks.EnumTest:
    objektwerks.Test:
      + test 0.011s
      + gate 0.011s
    It should read:
    objektwerks.EnumTest:
      + gate 0.011s
    objektwerks.Test:
      + test 0.011s
    Is this a known issue? Or just the Munit style?
    Michael Pilquist
    @mpilquist
    try adding parallelExecution in Test := false to build.sbt?
    objektwerks
    @objektwerks
    No, I haven't tried that yet.:)
    Ok, Michael, when is your book on Munit coming out? That worked! :)