Correctly handle promises and rejections around cluster connection (#4216)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-30 09:05:34 -05:00
1 parent bb30bdc750
commit 2ab9aeb83c
4 files changed
+78 -94

No files matched your search

+2 -2
View File
@@ -142,9 +142,9 @@ describe("kubeconfig manager tests", () => {
const configPath = await kubeConfManager.getPath();
expect(await fse.pathExists(configPath)).toBe(true);
await kubeConfManager.unlink();
await kubeConfManager.clear();
expect(await fse.pathExists(configPath)).toBe(false);
await kubeConfManager.unlink(); // doesn't throw
await kubeConfManager.clear(); // doesn't throw
expect(async () => {
await kubeConfManager.getPath();
}).rejects.toThrow("already unlinked");