mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
since jsdom 21, it's no longer possible to mock window.location See : https://github.com/jsdom/jsdom/issues/3492
10 lines
231 B
JavaScript
10 lines
231 B
JavaScript
// Wrapper around location window.location
|
|
//
|
|
// It's mainly needed because we can't mock window.location in jsdom
|
|
//
|
|
const locationPathName = (pathName) => {
|
|
window.location.pathname = pathName;
|
|
};
|
|
|
|
export { locationPathName };
|