title: How to skip Scala FunSuite tests under certain conditions?
body: <p>Suppose I have some tests that I want to only run if some environment variable is set and the value is valid. How do I do this with Scala FunSuite?</p>
  
  <p>For instance:</p>
  
  <pre><code>class Tests extends FunSuite {
    before {
      // Test if the environment variable is set and value is valid
    }
  
    test("foo") {
      ...
    }
  }
  </code></pre>
  
  <p>Test foo should only run when the check in the <code>before</code> call succeeded.
  I tried to use <code>assume</code> but it failed with <code>TestCanceledException</code>.</p>