title: Test sequence of sample data generated from clojure.spec
body: <p><strong>Context</strong></p>
  
  <ul>
  <li>I have a function that operates on a data structure.</li>
  <li>I have written a spec for the data structure this function operates on.</li>
  <li>This function returns a reagent component that is rendered in a browser (PhantomJS)</li>
  <li>The spec has some optional keys, and depending on whether or not those keys exist in the data when it's passed to the function, the output (component to be rendered in browser) of the aforementioned function will be affected.</li>
  <li>I am looking to use <code>clojure.test</code> to compare values of the data structure passed to the function generating the component with values grabbed from the rendered element, so simple unit test or input->output comparison is <em>not</em> what I'm going for here.</li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <p>Since calling <code>generate</code> or <code>sample</code> on the spec generator will sometimes include or omit the optional fields, I would like to iterate over a reasonably large set of data generated using <code>sample</code> and test each of the data structures, but I don't know the "right" or idiomatic way to do this. </p>
  
  <p>I have used <code>are</code> in <code>clojure.test</code> before, which is great, but since I'm testing against the rendered component in the browser, and <code>are</code> tests input->output it doesn't seem like the right tool for the job.</p>
  
  <p>Advice on a generally accepted practice here or language/clojure.test feature that would have me doing this in the most idiomatic way would be greatly appreciated.</p>