Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 708 Bytes

README.md

File metadata and controls

40 lines (30 loc) · 708 Bytes

@alot/jest-preset

Test your code using Jest with tests written in TypeScript.

Usage

  1. Add as a dependency:

    yarn add --dev @alot/jest-preset

  2. Create a tsconfig.json configuration in your app root if you haven't already, for example:

    {
      "compilerOptions": {
        "target": "es2015",
        "jsx": "react",
        "noEmit": true,
        "moduleResolution": "node"
      },
      "exclude": [
        "node_modules"
      ]
    }
  3. Modify your package.json or other Jest configuration to use this preset:

package.json example:

  {
+ "jest": {
+    "preset": "@alot/jest-preset",
+   ...
  }
  ```

4. That's it!