Skip to content

expect(element).to.have.xpath('//blink')

License

Notifications You must be signed in to change notification settings

davija/chai-have-xpath

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chai-have-xpath

expect(element).to.have.xpath('//blink')

Installation

> npm install --save-dev chai-have-xpath

Development

> npm install
> npm run watch

Usage

var chai = require('chai');
var React = require('react');
var TestUtils = require('react-addons-test-utils');
var chaiHaveXpath = require('chai-have-xpath');
var expect = chai.expect;
chai.use(chaiHaveXpath);

var component = TestUtils.renderIntoDocument(<h1>hi there o/</h1>);
expect(component).to.have.xpath('//h1[contains(., "hi there o/")]');

MIT © Rolf Erik Lekang

About

expect(element).to.have.xpath('//blink')

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%