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

cypress-network-idle

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-network-idle - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

package.json
{
"name": "cypress-network-idle",
"version": "1.4.1",
"version": "1.4.2",
"description": "A little Cypress.io plugin for waiting for network to be idle before continuing with the test",

@@ -32,3 +32,3 @@ "main": "src/index.js",

"devDependencies": {
"cypress": "9.6.0",
"cypress": "9.6.1",
"micro": "^9.3.4",

@@ -35,0 +35,0 @@ "micro-dev": "^3.0.0",

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

# cypress-network-idle ![cypress version](https://img.shields.io/badge/cypress-9.6.0-brightgreen) [![renovate-app badge][renovate-badge]][renovate-app] [![ci](https://github.com/bahmutov/cypress-network-idle/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-network-idle/actions/workflows/ci.yml)
# cypress-network-idle ![cypress version](https://img.shields.io/badge/cypress-9.6.1-brightgreen) [![renovate-app badge][renovate-badge]][renovate-app] [![ci](https://github.com/bahmutov/cypress-network-idle/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-network-idle/actions/workflows/ci.yml)
> A little Cypress.io plugin for waiting for network to be idle before continuing with the test

@@ -3,0 +3,0 @@

@@ -7,7 +7,9 @@ /// <reference types="cypress" />

cy.log(`network idle for ${timeLimitMs} ms`)
cy.log(`network idle for ${timeLimitMs} ms (timeout: ${timeout} ms)`)
cy.wrap('waiting...', { timeout })
.should(() => {
const d = +new Date()
const t = counters.lastNetworkAt || counters.started
const elapsed = +new Date() - t
const waited = d - counters.started
const elapsed = d - t
if (elapsed < timeLimitMs) {

@@ -17,5 +19,5 @@ // console.log('t =', t)

// console.log('timeLimitMs', timeLimitMs)
throw new Error('Network is busy')
throw new Error(`Network is busy. Failed after ${waited} ms`)
}
counters.finished = +new Date()
counters.finished = d
})

@@ -22,0 +24,0 @@ .then(() => {

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