title: How to create an Aurelia-Validation Validation object for Jasmine tests
body: <p>I'm currently using the Aurelia-Validation plugin to do client side validation. Since the validation object must be injected into the calling class's constructor, all my jasmine tests for the class in question now fail(since there's no validation object being passed in)</p>
  
  <p>I've been trying to create a mock Validation object for a while now, or even a real one but i can't seem to get it right. The closest I've gotten is:</p>
  
  <pre class="lang-js prettyprint-override"><code>beforeEach(() =&gt; {
      cache = new Cache();
      session = new Session();
      var valCon = new ValidationConfig();
      var obsLoc = new ObserverLocator();
      sut = new InsuredInformation(session, cache, new Validation(obsLoc,valCon));
  }); 
  </code></pre>
  
  <p>But I keep getting errors when I run Karma saying:</p>
  
  <pre><code>TypeError: Expecting a function in instanceof check, but got [object Object]
  </code></pre>
  
  <p>I'm assuming this has something to do with the validation object and how i have instantiated it. Has anyone successfully created Jasmine tests for Aurelia View-Models that make use of the aurelia-validation plugin?</p>