@open-wc/testing-helpers
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.7.7](https://github.com/open-wc/open-wc/tree/master/packages/testing-helpers/compare/@open-wc/testing-helpers@0.7.6...@open-wc/testing-helpers@0.7.7) (2019-01-24) | ||
### Bug Fixes | ||
* add docu for fixtureCleanup ([ab0170a](https://github.com/open-wc/open-wc/tree/master/packages/testing-helpers/commit/ab0170a)) | ||
## [0.7.6](https://github.com/open-wc/open-wc/tree/master/packages/testing-helpers/compare/@open-wc/testing-helpers@0.7.5...@open-wc/testing-helpers@0.7.6) (2019-01-20) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@open-wc/testing-helpers", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"description": "Testing Helpers following open-wc recommendations", | ||
@@ -31,3 +31,3 @@ "author": "open-wc", | ||
}, | ||
"gitHead": "8bd9cadbdf0dc5c2910bd85eb58efbcbe6b2d61c" | ||
"gitHead": "e19e6de88a9bcfac81161c7cca86070a56bcccbd" | ||
} |
@@ -86,1 +86,19 @@ # Testing Helpers | ||
``` | ||
## Fixture Cleanup | ||
By default, if you import anything via `import { ... } from '@open-wc/testing-helpers';`, it will automatically register a side-effect that cleans up your fixtures. | ||
If you want to be in full control you can do so by using | ||
```js | ||
import { fixture, fixtureCleanup } from '@open-wc/testing-helpers/index-no-side-effects.js'; | ||
it('can instantiate an element with properties', async () => { | ||
const el = await fixture(html`<my-el .foo=${'bar'}></my-el>`); | ||
expect(el.foo).to.equal('bar'); | ||
fixtureCleanup(); | ||
} | ||
// Alternatively, you can add the fixtureCleanup in the afterEach function, but note that this is exactly what the automatically registered side-effect does. | ||
afterEach(() => { | ||
fixtureCleanup(); | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25596
104