title: Run a test in Jest only if certain condition are met
body: <p>I want to run certain tests depending on certain conditions. If the condition is met then run, otherwise skip the test. I want to do that before being in the test (or maybe jest provide a function to cancel a test inside it? So that it doesn't throw an error)</p>
  <p>You can see here what I have :
  <a href="https://i.stack.imgur.com/D3fGV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3fGV.png" alt="enter image description here" /></a></p>
  <p>The setup: I'm testing different crypto-wallet for a DEX, so I have a battery of tests that runs for all those wallets. By design, some features are on some wallets and others don't have them. Here I'm trying to sign a transaction running on an EVM chain different from Ethereum (AVAX here). This will not work on all wallets (normal) like ethwallet, but will for others. I want to test only those that I know support this feature.</p>
  <p>My problem: wallet is initialized in beforeAll, and I don't have access to this object outside test() (the expected log is k2, k1 is out of scope and return gibberish). How can I access it then and know if I run the test or skip it? You can see that I tried to implement testif() but unfortunately not working because I have not the good value outside of test().</p>