-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
For example
const ReportLink = ({ href }) => (
<a href={href}>This is a link</a>
);
const props = { href: '/link/to' }
const reportLink = shallow(<ReportLink {...props}/>);
expect(reportLink).to.have.attr('href').equal(props.href);
Gives the following error
Window is not a constructor (evaluating '(0, _cheerio2.default)(this.wrapper.html())')
Works fine if I use mount
instead of shallow
. Documentation suggests that attr
is support in a shallow
render.
Using chai-enzyme v0.7.1
Metadata
Metadata
Assignees
Labels
No labels