title: TypeScript: How do you test your client-side code?
body: <p>When I write tests for my in-browser TS code, I hit the following problem. My "test" code files are located in a separate folder from the "application" code files (an arrangement that I am not willing to give up). Therefore, in order to import my "app" modules, I have to do this:</p>
  
  <pre><code>    // tests/TS/SubComponent/Module.Test.ts
      import m = module("../../Web/Scripts/SubComponent/Module");
  </code></pre>
  
  <p>This compiles just fine. But when loaded in browser, it will obviously not work, because from the standpoint of RequireJS running in the browser, the module is located at "<em>app/SubComponent/Module</em>" (after being remapped through web server and RequireJS config).</p>
  
  <p>With TS 0.8.3 I was able to pull off <a href="https://typescript.codeplex.com/workitem/934">this clever trick</a>, but in 0.9.0 it no longer works, because now the compiler <a href="http://typescript.codeplex.com/workitem/1101">doesn't let me treat a module as an interface</a>.</p>
  
  <p><strong>So the question is:</strong> how do <em>you</em> test your client-side code?
  Clearly, I can't be the only person to be doing it, can I? :-)</p>