/mock-window

Example of window mocking in Javascript Jest tests

Primary LanguageJavaScriptMIT LicenseMIT

Mock Window

Three different window mocking possibilities. For more details check the article on https://www.grzegorowski.com/how-to-mock-global-window-with-jest

Setup

Clone this repository with:

git clone git@github.com:jmarceli/mock-window.git

then install NPM dependencies:

npm install

Run

Execute:

npm run test

To run sample tests.


author: Jan Grzegorowski