jester js for typescript testing



If you are writing your code in typescript and decided to use jesterjs then this is the right blog to read. Jesterjs works well with .js files. If you're using typescript, you need to ts-jest.

To setup,


npm install --save-dev jest typescript ts-jest react-test-renderer


Then you need to configure file presets :-

npx ts-jest config:init
Then you can follow sample code as given by Jesterjs here, https://jestjs.io/docs/en/tutorial-react

Hope this helps to add test to your project, faster



Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm