overleaf/services/web/test/unit_frontend/es/support/fixture.js

19 lines
305 B
JavaScript
Raw Normal View History

2018-03-06 05:11:04 -05:00
class Fixture {
constructor () {
this.el = document.createElement('div')
2018-03-07 04:51:54 -05:00
document.body.appendChild(this.el)
2018-03-06 05:11:04 -05:00
}
load (html) {
this.el.innerHTML = html
return this.el.firstChild
}
cleanUp () {
this.el.innerHTML = ''
}
}
const fixture = new Fixture()
export default fixture