Using the “should NOT produce [exception]” syntax in ScalaTest September 16, 2023 by Tarik The current version of ScalaTest does support this: noException should be thrownBy 0 / 1 See docs.