Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.
/ chai-have-xpath Public archive

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

License

Notifications You must be signed in to change notification settings

relekang/chai-have-xpath

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