Skip to content

Commit 23f9055

Browse files
committed
ensure setInterval, etc tasks dont leak in tests
1 parent a09003a commit 23f9055

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

deno.lock

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ergomatic_test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ describe("Ergomatic", () => {
2626
assertSpyCalls(pluginManagerSpy, 1);
2727
} finally {
2828
pluginManagerSpy.restore();
29+
await ergomatic.stop();
2930
}
3031
});
3132
it("should not call start() for components if already running", async () => {
@@ -39,6 +40,7 @@ describe("Ergomatic", () => {
3940
assertSpyCalls(pluginManagerSpy, 1);
4041
} finally {
4142
pluginManagerSpy.restore();
43+
await ergomatic.stop();
4244
}
4345
});
4446
it("should raise an error event if a component throws an error", async () => {
@@ -62,6 +64,7 @@ describe("Ergomatic", () => {
6264
} finally {
6365
methodStub.restore();
6466
dispatchSpy.restore();
67+
await ergomatic.stop();
6568
}
6669
});
6770
});

0 commit comments

Comments
 (0)