Skip to content

Wild Wild Wolf

Developer. Because Superhero is not an official job title.

Menu

Jest

Jest: How to Mock window.location.href

Jest: How to Mock window.location.href

There may be a situation where you need to mock methods or properties on window.location in Jest. However, because of peculiarities of jsdom, this could be challenging. In this post there is one of the possible solutions to this problem.

wwa November 13, 2019January 13, 2021 NodeJS No Comments Read more

Recent Posts

  • How to Log Request Headers with Nginx and NJS
  • How to Conditionally Disable Object Cache Drop-in
  • Speeding up Docker Builds With eatmydata
  • How to Get the List of the Files Processed by ESLint
  • How to Add a Content-Hash Suffix to Uploaded Files in WordPress

Recent Comments

  • Tuga on CentOS 7: How to Change SSH Port
  • mofm on A Simple Script to Create systemd-nspawn Alpine Container

Archives

  • June 2022
  • January 2022
  • December 2021
  • October 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • January 2021
  • December 2020
  • July 2020
  • June 2020
  • May 2020
  • February 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • March 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018

Categories

  • DevOps
  • NodeJS
  • Random Thoughts
  • Server Administration
  • Uncategorized
  • WordPress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Copyright © 2022 Wild Wild Wolf. All rights reserved. Theme Spacious by ThemeGrill. Powered by: WordPress.