Skip to content

Demonstration for erroneous hover style applied in jsdom

Notifications You must be signed in to change notification settings

blake-discover/CRA-jest-emotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRA + Jest + Emotion

Bootstrapped from npx create-react-app

Intention

There is a discrepancy between pseudo classes applied to the button element in a browser and jsdom environment. Based on the style tags being injected to the document in the jsdom, we can see the :hover pseudo class is active.

Testing

  1. Run npm run start for a sanity check in a browser environment
  2. Run npm run test
    • The failing test will contain logs of the style tags injected in the document
    • The failing test should be passing since no hover method was called.

About

Demonstration for erroneous hover style applied in jsdom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published