/*global describe, it, assert */
define('first-element', function(require) {
  'use strict';

  var proto = Object.create(HTMLElement.prototype);
  proto.createdCallback = require('htemplate')(function(html) {
    html`<h1 class="first-element">first-element</h1>`;
  });

  document.registerElement('first-element', {
    prototype: proto
  });
});

define(function(require) {
  'use strict';

  require('first-element');

  document.getElementById('htemplate-out').innerHTML = `
    <first-element></first-element>
  `;

  describe('Basic custom element', function() {
    it('innerHTML generated by htemplate', function() {
      assert.equal(true, document.querySelector('first-element > h1')
                         .classList.contains('first-element'));
    });
  });
});
