Skip to content

Latest commit

 

History

History
 
 

jest-preset

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hops Jest Preset

npm

Please see the main Hops Readme for general information and a Getting Started Guide.

A Jest preset that makes it easier for Hops powered apps to use Jest.

It ensures that Babel works correctly out of the box and that requiring files such as images does not produce errors. identity-obj-proxy is used to make working with CSS modules easier in tests.

Installation

npm install --save-dev jest-preset-hops jest babel-jest ts-jest

Usage

Add jest-preset-hops as preset to your Jest config. This can for example be done by adding it to your package.json.

{
  "jest": {
    "preset": "jest-preset-hops"
  }
}

Feel free to extend the "jest"-configuration object along the way.

For running tests, use the Jest CLI.