dyoung2019 / jest-manual-mocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jest-manual-mocks

Demo project for using manual mocking internal node modules for JEST

https://jestjs.io/docs/en/manual-mocks

mocked functions

  • fs
    • readdirSync
    • mkdir

Instructions

  1. install jest
  2. create folder __mocks__
  3. add js file library to mock/inspect e.g. fs

About


Languages

Language:JavaScript 100.0%