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

@rckeller/cypress-unfetch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rckeller/cypress-unfetch

Unofficial Cypress utilities for tracking network state

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
decreased by-4.52%
Maintainers
1
Weekly downloads
 
Created
Source

@rckeller/cypress-react

Unofficial Cypress utilities for tracking network state

npm i -D @rckeller/cypress-unfetch

Configuration

These utilities automatically configure your cypress instance upon import.

// support/index.js
import '@rckeller/cypress-unfetch'

We recommmend setting up the optional cy.await command, which tracks in-flight requests in the background. You can use this to wait for network state to resolve before progressing to a new test run.

// support/index.js
import '@rckeller/cypress-unfetch/await'

// You can add an afterEach to this file, which becomes "global"
afterEach(() => {
  cy.await()
})

Registering cy.await starts a server in the background, which can be used to track and block specific routes like so.

// in support/index.js OR a test
beforeEach(() => {
  cy.route('/api/**').as('API')
})

test('something', () => {
  cy.log('before...')
    .wait('@API')
    .log('...after')
})

Keywords

FAQs

Package last updated on 04 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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