Sha256: 52890bef86cff1fa16b95dbb94b65786bb08e1e6d2d3cc5234b32ed002dfc7e4

Contents?: true

Size: 518 Bytes

Versions: 2

Compression:

Stored size: 518 Bytes

Contents

var Fixture;

Fixture = {
  node: null,

  prepare() {
    var node;

    this.clean();

    node = document.createElement("div");
    node.id = "Fixture";
    node.style.visibility = "hidden";
    document.body.appendChild(node);

    this.node = node;
  },

  clean() {
    var parent;

    if(!this.node) { return; }
    parent = this.node.parentNode;
    if(parent) { parent.removeChild(this.node); }
  },

  load(content) {
    this.node.innerHTML = content;
    return this.node;
  }
};

export default Fixture;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docks_theme_api-1.0.3 spec/assets/spec_fixture.js
docks_theme_api-1.0.2 spec/assets/spec_fixture.js