-
-
Save hiakku/1c3d7b9f494f86995fa31880c1255916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Reusable resize event handler function | |
const resizeWindowTestFunc = (width, height) => { | |
window.innerWidth = width; | |
window.innerHeight = height; | |
window.dispatchEvent(new Event('resize')); | |
}; | |
it('Test for event',()=>{ | |
//Before resizing here call the function with resize event | |
resizeWindowTestFunc(450, 450) | |
//After resizing here call the function with resize event | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment