title: Run ava test.before() just once for all tests
body: <p>I would like to use <code>test.before()</code> to bootstrap my tests. The setup I have tried does not work:</p>
  
  <pre><code>// bootstrap.js
  const test = require('ava')
  
  test.before(t =&gt; {
    // do this exactly once for all tests
  })
  
  
  module.exports = { test }
  
  
  // test1.js
  
  const { test } = require('../bootstrap')
  
  test(t =&gt; { ... {)
  </code></pre>
  
  <p>AVA will run the <code>before()</code> function before each test file. I could make a check within the <code>before</code> call to check if it has been called but I'd like to find a cleaner process. I have tried using the <code>require</code> parameter with:</p>
  
  <pre><code>"ava": {
    "require": [
      "./test/run.js"
    ]
   }
  </code></pre>
  
  <p>With:</p>
  
  <pre><code>// bootstrap,js
  const test = require('ava')
  
  module.exports = { test }
  
  
  // run.js
  
  const { test } = require('./bootstrap')
  
  test.before(t =&gt; { })
  
  
  // test1.js
  const { test } = require('../bootstrap')
  
  test(t =&gt; { ... {)
  </code></pre>
  
  <p>But that just breaks with <code>worker.setRunner is not a function</code>. Not sure what it expects there.</p>