function spyOnValueSetter(input, initialValue) {
	let value = initialValue;
	let isSet = false;
	Object.defineProperty(input, 'value', {
		get() {
			return value;
		},
		set(_value) {
			value = _value;
			isSet = true;
		}
	});

	return {
		isSetCalled() {
			return isSet;
		},
		reset() {
			isSet = false;
		}
	};
}
@param {HTMLInputElement} input
@param {string} initialValue