@poach/jest

0.0.3 • Public • Published

Poach-jest

Poach configuration recipe for Jest.

Needs @poach/core and @poach/react installed and configured.

Installation

npm i --save-dev @poach/jest

Configuration

Extend your .eslintrc.js

let config = require('@poach/core/config/eslint/eslint.core');
//...
config = require('@poach/react/config/eslint/eslint.core')(config); //you should already have this
config = require('@poach/jest/config/eslint/eslint.core')(config);
//...
module.exports = config;
  • Copy the base jest.config.js in the root folder of your project.
cp -R node_modules/@poach/jest/boilerplate/jest.config.js .
  • Add the following to your package.json:
...
"scripts": {
    ...
    "test": "jest"
    ...
},
...

You are now ready to write a Jest test anywhere in your project

//example.test.js
it(`example test`, () => {
  expect(true).toBe(true)
})

/@poach/jest/

    Package Sidebar

    Install

    npm i @poach/jest

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    3.17 kB

    Total Files

    7

    Last publish

    Collaborators

    • marcellomontemagno