mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix memory leak in unit tests (#5597)
This commit is contained in:
1 parent
2eb585e88e
commit
3058bea88f
37 files changed
+1502
-1777
No files matched your search
@@ -449,7 +449,7 @@ describe("KubeApi", () => {
|
||||
expect(spy).toHaveBeenCalledWith("/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", { query: { timeoutSeconds: 60 }}, expect.anything());
|
||||
});
|
||||
|
||||
it("aborts watch using abortController", async (done) => {
|
||||
it("aborts watch using abortController", (done) => {
|
||||
const spy = jest.spyOn(request, "getResponse");
|
||||
|
||||
mockFetch.mockResponse(async request => {
|
||||
@@ -472,10 +472,7 @@ describe("KubeApi", () => {
|
||||
});
|
||||
|
||||
expect(spy).toHaveBeenCalledWith("/api/v1/namespaces/kube-system/pods?watch=1&resourceVersion=", { query: { timeoutSeconds: 60 }}, expect.anything());
|
||||
|
||||
await delay(100);
|
||||
|
||||
abortController.abort();
|
||||
delay(100).then(() => abortController.abort());
|
||||
});
|
||||
|
||||
describe("retries", () => {
|
||||
|
||||
Reference in new issue
Block a user