cypress-react-unit-test
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -97,5 +97,17 @@ "use strict"; | ||
var displayname = alias || jsx.type.prototype.constructor.name; | ||
var cmd; | ||
cy.injectReactDOM() | ||
.log("ReactDOM.render(<" + displayname + " ... />)", jsx.props) | ||
.window({ log: false }) | ||
.then(function () { | ||
cmd = Cypress.log({ | ||
name: 'mount', | ||
// @ts-ignore | ||
message: ["ReactDOM.render(<" + displayname + " ... />)"], | ||
consoleProps: function () { | ||
return { | ||
props: jsx.props | ||
}; | ||
} | ||
}); | ||
}) | ||
.then(setXMLHttpRequest) | ||
@@ -109,3 +121,6 @@ .then(setAlert) | ||
}); | ||
cy.copyComponentStyles(jsx); | ||
cy.copyComponentStyles(jsx) | ||
.then(function () { | ||
cmd.snapshot().end(); | ||
}); | ||
}; | ||
@@ -163,4 +178,3 @@ Cypress.Commands.add('mount', exports.mount); | ||
var name_1 = module.name, type = module.type, location_1 = module.location; | ||
cy.log("Loading " + name_1 + " via " + type) | ||
.readFile(location_1) | ||
cy.readFile(location_1, { log: false }) | ||
.then(function (source) { return Cypress.modules.push({ name: name_1, type: type, location: location_1, source: source }); }); | ||
@@ -167,0 +181,0 @@ }; |
@@ -104,5 +104,19 @@ /// <reference path="./index.d.ts" /> | ||
const displayname = alias || jsx.type.prototype.constructor.name | ||
let cmd | ||
cy.injectReactDOM() | ||
.log(`ReactDOM.render(<${displayname} ... />)`, jsx.props) | ||
.window({ log: false }) | ||
.then(() => { | ||
cmd = Cypress.log({ | ||
name: 'mount', | ||
// @ts-ignore | ||
message: [`ReactDOM.render(<${displayname} ... />)`], | ||
consoleProps () { | ||
return { | ||
props: jsx.props | ||
} | ||
} | ||
}) | ||
}) | ||
.then(setXMLHttpRequest) | ||
@@ -120,2 +134,5 @@ .then(setAlert) | ||
cy.copyComponentStyles(jsx) | ||
.then(() => { | ||
cmd.snapshot().end() | ||
}) | ||
} | ||
@@ -179,4 +196,3 @@ | ||
let { name, type, location } = module | ||
cy.log(`Loading ${name} via ${type}`) | ||
.readFile(location) | ||
cy.readFile(location, {log:false}) | ||
.then(source => Cypress.modules.push({ name, type, location, source })) | ||
@@ -183,0 +199,0 @@ } |
{ | ||
"name": "cypress-react-unit-test", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Unit test React components using Cypress", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21562
414