Copy testRepeat helper to extension integration tests

This commit is contained in:
Rob Lourens
2021-05-18 21:53:57 -07:00
parent 721cdd6472
commit 97518f5e86

View File

@@ -137,3 +137,9 @@ export async function asPromise<T>(event: vscode.Event<T>, timeout = vscode.env.
});
});
}
export function testRepeat(n: number, description: string, callback: (this: any) => any): void {
for (let i = 0; i < n; i++) {
test(`${description} (iteration ${i})`, callback);
}
}