-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch dom testing library for new pretty format api
- Loading branch information
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/dist/pretty-dom.js b/dist/pretty-dom.js | ||
index 6719cb06f4a1adba30333866a9a84bce794446a9..50d91905461fa44f7fdf5d403c10df4161dcfeae 100644 | ||
--- a/dist/pretty-dom.js | ||
+++ b/dist/pretty-dom.js | ||
@@ -1,14 +1,12 @@ | ||
"use strict"; | ||
|
||
-var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
- | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.prettyDOM = prettyDOM; | ||
exports.logDOM = void 0; | ||
|
||
-var _prettyFormat = _interopRequireDefault(require("pretty-format")); | ||
+var _prettyFormat = require("pretty-format"); | ||
|
||
var _getUserCodeFrame = require("./get-user-code-frame"); | ||
|
||
@@ -26,7 +24,7 @@ const getMaxLength = dom => inCypress(dom) ? 0 : typeof process !== 'undefined' | ||
const { | ||
DOMElement, | ||
DOMCollection | ||
-} = _prettyFormat.default.plugins; | ||
+} = _prettyFormat.plugins; | ||
|
||
function prettyDOM(dom, maxLength, options) { | ||
if (!dom) { | ||
@@ -58,7 +56,7 @@ function prettyDOM(dom, maxLength, options) { | ||
throw new TypeError(`Expected an element or document but got ${domTypeName}`); | ||
} | ||
|
||
- const debugContent = (0, _prettyFormat.default)(dom, { | ||
+ const debugContent = (0, _prettyFormat.format)(dom, { | ||
plugins: [DOMElement, DOMCollection], | ||
printFunctionName: false, | ||
highlight: inNode(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters