Skip to content

Commit

Permalink
[Deps] [breaking] update cheerio to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 28, 2017
1 parent f05a335 commit e7afc94
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/enzyme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"author": "Leland Richardson <leland.richardson@airbnb.com>",
"license": "MIT",
"dependencies": {
"cheerio": "^0.22.0",
"cheerio": "^1.0.0-rc.2",
"function.prototype.name": "^1.0.3",
"is-subset": "^0.1.1",
"lodash": "^4.17.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class ReactWrapper {
*/
render() {
const html = this.html();
return html === null ? cheerio() : cheerio.load(html).root();
return html === null ? cheerio() : cheerio.load('')(html).root();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ class ShallowWrapper {
* @returns {CheerioWrapper}
*/
render() {
return this.type() === null ? cheerio() : cheerio.load(this.html()).root();
return this.type() === null ? cheerio() : cheerio.load('')(this.html()).root();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default function render(node, options = {}) {
const adapter = getAdapter(options);
const renderer = adapter.createRenderer({ mode: 'string', ...options });
const html = renderer.render(node, options.context);
return cheerio.load(html).root();
return cheerio.load('')(html).root();
}

0 comments on commit e7afc94

Please sign in to comment.