<commit_before>import helperElement from '../lib/element';
import resolved from '../lib/resolved';
import skate from '../../src/index';

describe('constructor', function () {
  var id;

  beforeEach(function () {
    id = helperElement().safe;
  });

  it('existing elements', function () {
    id = id.replace(/-/, '');
    var Ctor = skate(id, {});
    var ctor = new Ctor();
    expect(resolved(ctor)).to.equal(true);
    expect(ctor.tagName.toLowerCase()).to.equal(id);
  });

  it('existing elements + extends', function () {
    id = id.replace(/-/, '');
    var Ctor = skate(id, { extends: 'span' });
    var ctor = new Ctor();
    expect(resolved(ctor)).to.equal(true);
    expect(ctor.tagName.toLowerCase()).to.equal('span');
    expect(ctor.getAttribute('is')).to.equal(id);
  });

  it('custom elements', function () {
    var Ctor = skate(id, {});<commit_msg>Really not sure why we were doing this.<commit_after>import helperElement from '../lib/element';
import resolved from '../lib/resolved';
import skate from '../../src/index';

describe('constructor', function () {
  var id;

  beforeEach(function () {
    id = helperElement().safe;
  });

  it('existing elements', function () {
    id = id.replace(/-/, '');
    var Ctor = skate(id, {});
    var ctor = new Ctor();
    expect(resolved(ctor)).to.equal(true);
    expect(ctor.tagName.toLowerCase()).to.equal(id);
  });

  it('existing elements + extends', function () {
    var Ctor = skate(id, { extends: 'span' });
    var ctor = new Ctor();
    expect(resolved(ctor)).to.equal(true);
    expect(ctor.tagName.toLowerCase()).to.equal('span');
    expect(ctor.getAttribute('is')).to.equal(id);
  });

  it('custom elements', function () {
    var Ctor = skate(id, {});
{'fraction_non_alphanumeric': 0.2048331415420023, 'fraction_numerical': 0.0, 'mean_word_length': 3.4704370179948585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5291650', 'n_tokens_mistral': 555, 'n_tokens_neox': 549, 'n_words': 119}