Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 2.41 KB

OUTLINE.md

File metadata and controls

75 lines (50 loc) · 2.41 KB

Instructions

Setup Typescript and Jest

Typescript and TS config

yarn add -D typescript

Typescript and Jest + Babel

yarn add --dev babel-jest @babel/core @babel/preset-env

yarn add --dev @babel/preset-typescript

yarn add --dev @types/jest

    • babel.config.js

⚠️ However, there are some caveats to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use ts-jest instead, or just run the TypeScript compiler tsc separately (or as part of your build process).

01 Testing functions

02 Testing components

03 Testing Hooks

04 Testing Context

06 API Calls

07 Graphql

Resources