Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-react-router

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-react-router - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

dist/addReactRouterHistoryCommand.d.ts

18

dist/cypress-react-router.cjs.development.js

@@ -8,2 +8,19 @@ 'use strict';

var addReactRouterHistoryCommand = function addReactRouterHistoryCommand() {
Cypress.Commands.add('historyPush', {
prevSubject: false
}, function (path, state) {
cy.window().then(function (win) {
win.cyHistory.push(path, state);
});
});
Cypress.Commands.add('historyReplace', {
prevSubject: false
}, function (path, state) {
cy.window().then(function (win) {
win.cyHistory.replace(path, state);
});
});
};
var CypressHistorySupport = function CypressHistorySupport() {

@@ -20,2 +37,3 @@ var history = reactRouterDom.useHistory();

exports.CypressHistorySupport = CypressHistorySupport;
exports.addReactRouterHistoryCommand = addReactRouterHistoryCommand;
//# sourceMappingURL=cypress-react-router.cjs.development.js.map

2

dist/cypress-react-router.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("react-router-dom");exports.CypressHistorySupport=function(){var t=r.useHistory();return e.useEffect((function(){window.Cypress&&(window.cyHistory=t)}),[t]),null};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("react-router-dom");exports.CypressHistorySupport=function(){var t=r.useHistory();return e.useEffect((function(){window.Cypress&&(window.cyHistory=t)}),[t]),null},exports.addReactRouterHistoryCommand=function(){Cypress.Commands.add("historyPush",{prevSubject:!1},(function(e,r){cy.window().then((function(t){t.cyHistory.push(e,r)}))})),Cypress.Commands.add("historyReplace",{prevSubject:!1},(function(e,r){cy.window().then((function(t){t.cyHistory.replace(e,r)}))}))};
//# sourceMappingURL=cypress-react-router.cjs.production.min.js.map
import { useEffect } from 'react';
import { useHistory } from 'react-router-dom';
var addReactRouterHistoryCommand = function addReactRouterHistoryCommand() {
Cypress.Commands.add('historyPush', {
prevSubject: false
}, function (path, state) {
cy.window().then(function (win) {
win.cyHistory.push(path, state);
});
});
Cypress.Commands.add('historyReplace', {
prevSubject: false
}, function (path, state) {
cy.window().then(function (win) {
win.cyHistory.replace(path, state);
});
});
};
var CypressHistorySupport = function CypressHistorySupport() {

@@ -14,3 +31,3 @@ var history = useHistory();

export { CypressHistorySupport };
export { CypressHistorySupport, addReactRouterHistoryCommand };
//# sourceMappingURL=cypress-react-router.esm.js.map

@@ -0,1 +1,2 @@

export * from './addReactRouterHistoryCommand';
export * from './CypressHistorySupport';
{
"name": "cypress-react-router",
"author": "Maurice de Beijer",
"version": "0.1.1",
"version": "0.2.0",
"license": "MIT",

@@ -19,2 +19,3 @@ "main": "dist/index.js",

"test": "tsdx test --passWithNoTests",
"compile": "tsc --noEmit",
"lint": "tsdx lint",

@@ -21,0 +22,0 @@ "prepare": "tsdx build",

@@ -0,1 +1,2 @@

export * from './addReactRouterHistoryCommand';
export * from './CypressHistorySupport';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc