Follow

writing unit tests because good software means eating your vegetables

me: having unit tests rules. I couldn't release msync at the scale I do with this much confidence without unit tests
also me: uuugh, I hate writing unit tests

writing them for msync isn't usually that bad because catch2 is the most delightful testing framework I've ever used, but, you know. it's still work

@BestGirlGrace Good testing tools are criminally undervalued. Especially in languages that don’t already have strong testing cultures. I feel like a lot of languages have frameworks that copy RSpec in a shallow way without realizing what makes it actually good (it isn’t just the DSL).

@benhamill See, I cut my teeth in a world where everyone's trying to copy JUnit/NUnit/XUnit, and I'm not sure those was ever that good in the first place. Anything else feels like a breath of fresh air.

Especially since catch2 seems to match up really well with how my brain wants to structure tests.

@BestGirlGrace Yeah. JUnit is… bad. It’s like a lot of Java, IMO, it works but very little thought was put in to usability and mental ergonomics.

@benhamill @BestGirlGrace i dunno, i've been finding it alright to work with in kotlin apps

granted, kotlin supports doing a bunch of rspec-style stuff, since you can write more or less any string as the names of test methods and you can install a should dsl in extension method form :blobcatgooglyshrug:

it probably sucks if you actually use junit with java code

@00dani @BestGirlGrace To me, some of the biggest missing features I feel when using tools other than native RSpec (or Elixir’s built-in tooling) are the way example sets (with before and after) can be nested and managed and the test runner itself.

@benhamill @BestGirlGrace yeah, you don't get that with junit. having just a setup and teardown hook for the entire class of test cases is not nearly as nice as having arbitrarily nestable context blocks

i would assume there's a kotlin-specific test library that actually does support that stuff, since kotlin has very nice lambda support and could trivially provide a structure just like rspec? but we're just using junit :blobcatgooglyshrug:

@BestGirlGrace I have absolutely no idea if it'd even be possible to write unit tests for df-ai and weblegends

Sign in to participate in the conversation
Princess Grace's Space Base Place

Don't let the name fool you. All the pornography here is legal, and much of it is hand-written. No fascists, no bigots.