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

@emotion/jest

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/jest

Jest utilities for emotion

  • 11.0.0-next.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
273K
decreased by-16.62%
Maintainers
3
Weekly downloads
 
Created

What is @emotion/jest?

@emotion/jest is a package that provides custom Jest matchers for testing Emotion styles. It allows you to write tests that can check if your components have the correct styles applied, making it easier to ensure that your styled components behave as expected.

What are @emotion/jest's main functionalities?

toHaveStyleRule

The `toHaveStyleRule` matcher allows you to check if a component has a specific style rule applied. This is useful for ensuring that your styled components have the correct styles.

const { toHaveStyleRule } = require('@emotion/jest');
expect.extend({ toHaveStyleRule });

// Example usage
import styled from '@emotion/styled';

const Button = styled.button`
  color: hotpink;
`;

// In your test file
expect(Button).toHaveStyleRule('color', 'hotpink');

Other packages similar to @emotion/jest

Keywords

FAQs

Package last updated on 17 Mar 2020

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