{
  "_args": [
    [
      {
        "hosted": {
          "directUrl": "https://raw.githubusercontent.com/polymerelements/test-fixture/master/package.json",
          "gitUrl": "git://github.com/polymerelements/test-fixture.git",
          "httpsUrl": "git+https://github.com/polymerelements/test-fixture.git",
          "shortcut": "github:polymerelements/test-fixture",
          "ssh": "git@github.com:polymerelements/test-fixture.git",
          "sshUrl": "git+ssh://git@github.com/polymerelements/test-fixture.git",
          "type": "github"
        },
        "name": "test-fixture",
        "raw": "test-fixture@github:polymerelements/test-fixture",
        "rawSpec": "github:polymerelements/test-fixture",
        "scope": null,
        "spec": "github:polymerelements/test-fixture",
        "type": "hosted"
      },
      "C:\\Workspace\\web-component-tester\\node_modules\\web-component-tester"
    ]
  ],
  "_from": "polymerelements/test-fixture",
  "_id": "test-fixture@1.1.1",
  "_inCache": true,
  "_installable": true,
  "_location": "/test-fixture",
  "_phantomChildren": {},
  "_requested": {
    "hosted": {
      "directUrl": "https://raw.githubusercontent.com/polymerelements/test-fixture/master/package.json",
      "gitUrl": "git://github.com/polymerelements/test-fixture.git",
      "httpsUrl": "git+https://github.com/polymerelements/test-fixture.git",
      "shortcut": "github:polymerelements/test-fixture",
      "ssh": "git@github.com:polymerelements/test-fixture.git",
      "sshUrl": "git+ssh://git@github.com/polymerelements/test-fixture.git",
      "type": "github"
    },
    "name": "test-fixture",
    "raw": "test-fixture@github:polymerelements/test-fixture",
    "rawSpec": "github:polymerelements/test-fixture",
    "scope": null,
    "spec": "github:polymerelements/test-fixture",
    "type": "hosted"
  },
  "_requiredBy": [
    "/web-component-tester"
  ],
  "_resolved": "git://github.com/polymerelements/test-fixture.git#05514d6f32ade6fe54de5b242bbb43ea9dcff3c0",
  "_shasum": "8f2779442403aba1f7c57383c1199a443b21cfcf",
  "_shrinkwrap": null,
  "_spec": "test-fixture@github:polymerelements/test-fixture",
  "_where": "C:\\Workspace\\web-component-tester\\node_modules\\web-component-tester",
  "author": {
    "name": "The Polymer Authors"
  },
  "bugs": {
    "url": "https://github.com/polymerelements/test-fixture/issues"
  },
  "dependencies": {},
  "description": "A simple element to fixture DOM for tests",
  "devDependencies": {},
  "gitHead": "05514d6f32ade6fe54de5b242bbb43ea9dcff3c0",
  "homepage": "https://github.com/polymerelements/test-fixture#readme",
  "keywords": [
    "web-components",
    "polymer",
    "testing"
  ],
  "license": "BSD-3-Clause",
  "main": "test-fixture.html",
  "name": "test-fixture",
  "optionalDependencies": {},
  "readme": "\n<!---\n\nThis README is automatically generated from the comments in these files:\ntest-fixture.html\n\nEdit those files, and our readme bot will duplicate them over here!\nEdit this file, and the bot will squash your changes :)\n\nThe bot does some handling of markdown. Please file a bug if it does the wrong\nthing! https://github.com/PolymerLabs/tedium/issues\n\n-->\n\n[![Build status](https://travis-ci.org/PolymerElements/test-fixture.svg?branch=master)](https://travis-ci.org/PolymerElements/test-fixture)\n\n\n##&lt;test-fixture&gt;\n\nThe `<test-fixture>` element can simplify the exercise of consistently\nresetting a test suite's DOM. To use it, wrap the test suite's DOM as a template:\n\n```html\n<test-fixture id=\"SomeElementFixture\">\n  <template>\n    <some-element id=\"SomeElementForTesting\"></some-element>\n  </template>\n</test-fixture>\n```\n\nNow, the `<test-fixture>` element can be used to generate a copy of its\ntemplate:\n\n```html\n<script>\ndescribe('<some-element>', function () {\n  var someElement;\n\n  beforeEach(function () {\n    document.getElementById('SomeElementFixture').create();\n    someElement = document.getElementById('SomeElementForTesting');\n  });\n});\n</script>\n```\n\nFixtured elements can be cleaned up by calling `restore` on the `<test-fixture>`:\n\n```javascript\n  afterEach(function () {\n    document.getElementById('SomeElementFixture').restore();\n    // <some-element id='SomeElementForTesting'> has been removed\n  });\n```\n\n`<test-fixture>` will create fixtures from all of its immediate `<template>`\nchildren. The DOM structure of fixture templates can be as simple or as complex\nas the situation calls for.\n\n## Even simpler usage in Mocha\n\nIn Mocha, usage can be simplified even further. Include `test-fixture-mocha.js`\nafter Mocha in the `<head>` of your document and then fixture elements like so:\n\n```html\n<script>\ndescribe('<some-element>', function () {\n  var someElement;\n\n  beforeEach(function () {\n    someElement = fixture('SomeElementFixture');\n  });\n});\n</script>\n```\n\nFixtured elements will be automatically restored in the `afterEach` phase of the\ncurrent Mocha `Suite`.\n\n## Data-bound templates\n\nData-binding systems are also supported, as long as your (custom) template\nelements define a `stamp(model)` method that returns a document fragment. This\nallows you to stamp out templates w/ custom models for your fixtures.\n\nFor example, using Polymer 0.8's `dom-template`:\n\n```html\n<test-fixture id=\"bound\">\n  <template is=\"dom-template\">\n    <span>{{greeting}}</span>\n  </template>\n</test-fixture>\n```\n\nYou can pass an optional context argument to `create()` or `fixture()` to pass\nthe model:\n\n```js\nvar bound = fixture('bound', {greeting: 'ohai thurr'});\n```\n\n## The problem being addressed\n\nConsider the following `web-component-tester` test suite:\n\n```html\n<!doctype html>\n<html>\n<head>\n  <title>some-element test suite</title>\n\n  <link rel=\"import\" href=\"../some-element.html\">\n</head>\n<body>\n  <some-element id=\"SomeElementForTesting\"></some-element>\n  <script>\ndescribe('<some-element>', function () {\n  var someElement;\n\n  beforeEach(function () {\n    someElement = document.getElementById('SomeElementForTesting');\n  });\n\n  it('can receive property `foo`', function () {\n    someElement.foo = 'bar';\n    expect(someElement.foo).to.be.equal('bar');\n  });\n\n  it('has a default `foo` value of `undefined`', function () {\n    expect(someElement.foo).to.be.equal(undefined);\n  });\n});\n  </script>\n</body>\n</html>\n```\n\nIn this contrived example, the suite will pass or fail depending on which order\nthe tests are run in. It is non-deterministic because `someElement` has\ninternal state that is not properly reset at the end of each test.\n\nIt would be trivial in the above example to simply reset `someElement.foo` to\nthe expected default value of `undefined` in an `afterEach` hook. However, for\nnon-contrived test suites that target complex elements, this can result in a\nlarge quantity of ever-growing set-up and tear-down boilerplate.\n\n\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/polymerelements/test-fixture.git"
  },
  "version": "1.1.1"
}
