https://github.com/kossnocorp/playground-test-helpers
DOM playground test helpers
https://github.com/kossnocorp/playground-test-helpers
Last synced: 2 months ago
JSON representation
DOM playground test helpers
- Host: GitHub
- URL: https://github.com/kossnocorp/playground-test-helpers
- Owner: kossnocorp
- Created: 2014-10-23T18:40:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-25T05:42:23.000Z (over 9 years ago)
- Last Synced: 2025-02-01T03:46:35.161Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 105 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# playground-test-helpers
DOM playground test helpers.
## Installation
```
npm install playground-test-helpers --save-dev
```## Example
Use with [Mocha](http://mochajs.org) or [Jasmine](http://jasmine.github.io):
``` js
var PlaygroundTestHelpers = require('playground-test-helpers')
var React = require('react')
var Button = require('.')describe('Button', function() {
before each test
// Get clean
PlaygroundTestHelpers.prepareFilter()it('renders button', function() {
var playground = PlaygroundTestHelpers.get()
React.render(React.createElement(Button), playground)
assert(playground.querySelector('button'))
})
})
```## License
MIT