New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@helpscout/cyan

Package Overview
Dependencies
Maintainers
6
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helpscout/cyan

Cypress-like Testing for React + JSDOM

  • 0.12.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
43
decreased by-4.44%
Maintainers
6
Weekly downloads
 
Created
Source

🐱 Cyan

Build Status Coverage Status npm version

Cypress-like Testing for React + JSDOM

Table of Contents

Installation

npm install --save-dev @helpscout/cyan

Example

import React from 'react'
import { cy } from '@helpscout/cyan'
import Modal from '../Modal'

cy.useFakeTimers()

test('Can open/close a Modal', () => {
  cy.render(
    <Modal trigger={<button>Open</button>}>
      <div className="content">Content</div>
    </Modal>,
  )

  cy.get('button').click()

  expect(cy.get('.Modal').hasClass('is-open')).toBeTruthy()
  expect(cy.get('.content').exists()).toBeTruthy()

  cy.getByCy('CloseButton').click()

  expect(cy.get('.Modal').hasClass('is-open')).toBeFalsy()
  expect(cy.get('.content').exists()).toBeFalsy()
})

Documentation

For additional information, check out our documentation!

Keywords

FAQs

Package last updated on 21 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