diff --git a/dist/clusters.spec.js b/dist/clusters.spec.js index ddabd75..a5845ea 100644 --- a/dist/clusters.spec.js +++ b/dist/clusters.spec.js @@ -183,8 +183,8 @@ describe('pollForCluster', () => { cluster: Object.assign(Object.assign({}, responseCluster), { status: "provisioning" }), })); await mockServer.forGet(`/cluster/${responseCluster.id}`).thenReply(404); - expect(() => { - (0, clusters_1.pollForStatus)(apiClient, "1234abcd", "running", 120, 1); + expect(async () => { + await (0, clusters_1.pollForStatus)(apiClient, "1234abcd", "running", 120, 1); }).toThrow(clusters_1.StatusError); }); }); diff --git a/src/clusters.spec.ts b/src/clusters.spec.ts index 93cf22c..7788fbe 100644 --- a/src/clusters.spec.ts +++ b/src/clusters.spec.ts @@ -214,8 +214,8 @@ describe('pollForCluster', () => { })); await mockServer.forGet(`/cluster/${responseCluster.id}`).thenReply(404); - expect(() => { - pollForStatus(apiClient, "1234abcd", "running", 120, 1); + expect(async () => { + await pollForStatus(apiClient, "1234abcd", "running", 120, 1); }).toThrow(StatusError); }); });