{"size": 726, "ext": "js", "max_stars_repo_path": "packages/mip/test/specs/register-element.spec.js", "max_stars_repo_name": "VenyXiong/mip2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/mip/test/specs/register-element.spec.js", "max_issues_repo_name": "VenyXiong/mip2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/mip/test/specs/register-element.spec.js", "max_forks_repo_name": "VenyXiong/mip2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.8888888889, "max_line_length": 74, "alphanum_fraction": 0.7011019284}
/**
 * @file register-element spec file
 * @author huanghuiquan(huanghuiquan@baidu.com)
 */

/* globals describe, before, it, expect */

import registerElement from 'src/register-element.js'
import CustomElement from 'src/custom-element.js'

describe('Register element', function () {
  let ele
  before(function () {
    registerElement('mip-example', class Example extends CustomElement {})
    ele = document.createElement('mip-example')
    document.body.appendChild(ele)
  })

  it('should register a custom element', function () {
    expect(ele).to.have.property('customElement')
  })

  it('should has a mip-element class in dom', function () {
    expect(ele.classList.contains('mip-element')).to.equal(true)
  })
})
