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.
npm install --save-dev jest-preset-hops jest babel-jest ts-jest
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.