1.0.2 • Published 9 years ago

cheerio-react v1.0.2

Weekly downloads
36
License
MIT
Repository
github
Last release
9 years ago

##Usage

var React = require('react');
var render = require('cheerio-react');

var testComponent = React.createElement('div', {className: 'testClass'}, 'Test');

var testComponentOutput = render(testComponent);

console.log('test 1: ' + testComponentOutput.is('div'))
console.log('test 2: ' + testComponentOutput.hasClass('testClass'))
console.log('test 3: ' + (testComponentOutput.text() == 'Test'))

Useful for writing assertions in Mocha tests without having to moc the dom.

For the full object api see cheerio

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago