title: Karma html2js doesn't seem to have created any __html__ array
body: <p>I am attempting to set up tests for a Polymer application using Karma.  However an essential element of those tests is the basic html fixture.</p>
  
  <p>However, when I get to the code that tries to read the <code>__html__</code> array. this gives an undefined.</p>
  
  <p>I have included all the key files in a gist
  <a href="https://gist.github.com/akc42/121c619ef2476ce82086" rel="nofollow">https://gist.github.com/akc42/121c619ef2476ce82086</a></p>
  
  <p>Because polymer.js needs to be loaded as the first script in head, and because Karma includes all the files as script tags, I have a PolymerTests.js script which adds the Polymer element to the head.  It also defines a load fixtures function which should read one of the files that have been placed in <code>__html__</code> and adds it to a container div in the main body of the test page.</p>
  
  <pre><code>var container;  //Used to hold fixture
  PolymerTests.loadFixture = function(fixture,done) {
    container = document.createElement("div");
    container.innerHTML = __html__[fixture];
    document.body.appendChild(container);
    waits(0);
    done();
  };
  </code></pre>
  
  <p>This is called in a beforeEach routine for a specific test.</p>
  
  <p>However when I get there, I get undefined.</p>
  
  <p>EDITED
  The question of course is has anyone any idea how to work out what I am doing wrong.  I tried a debug session, but can't see <code>window.__html__</code> defined anywhere.</p>