src/vs/workbench/api/common/extHostTypes.ts/testItemPropAccessor
const testItemPropAccessor = <K extends keyof vscode.TestItem>(
	api: IExtHostTestItemApi,
	key: K,
	defaultValue: vscode.TestItem[K],
	equals: (a: vscode.TestItem[K], b: vscode.TestItem[K]) => boolean
) => {
	let value = defaultValue;
	return {
		enumerable: true,
		configurable: false,
		get() {
			return value;
		},
		set(newValue: vscode.TestItem[K]) {
			if (!equals(value, newValue)) {
				value = newValue;
				api.bus.fire([ExtHostTestItemEventType.SetProp, key, newValue]);
			}
		},
	};
};