function hijackMethod(target, method, clock) {
				clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(
					target,
					method
				);
				clock[`_${method}`] = target[method];

				if (method === "Date") {
					const date = mirrorDateProperties(clock[method], target[method]);
					target[method] = date;
				} else if (method === "performance") {
					const originalPerfDescriptor = Object.getOwnPropertyDescriptor(
						target,
						method
					);
					// JSDOM has a read only performance field so we have to save/copy it differently
					if (
						originalPerfDescriptor &&
						originalPerfDescriptor.get &&
						!originalPerfDescriptor.set
					) {
						Object.defineProperty(
							clock,
							`_${method}`,
							originalPerfDescriptor
						);

						const perfDescriptor = Object.getOwnPropertyDescriptor(
							clock,
							method
						);
						Object.defineProperty(target, method, perfDescriptor);
					} else {
						target[method] = clock[method];
					}
				} else {
					target[method] = function () {
						return clock[method].apply(clock, arguments);
					};

					Object.defineProperties(
						target[method],
						Object.getOwnPropertyDescriptors(clock[method])
					);
				}

				target[method].clock = clock;
			}
@param {object} target the target containing the method to replace
@param {string} method the keyname of the method on the target
@param {Clock} clock