Skip to content

Commit 3ee38ad

Browse files
committed
fix: test failed
a test case that was listening to an event that was dispatched after a timeout failed. Changed the test case to await the resolve of the `pull` method
1 parent 49a5cda commit 3ee38ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EventEmitter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Deno.test("EventEmitter", async (ctx) => {
5555
}
5656

5757
await ctx.step("reserved events", async (ctx) => {
58-
await ctx.step("listening is possible", () => {
58+
await ctx.step("listening is possible", async () => {
5959
const instance = new Implementing();
6060

61-
instance.once("reserved", (reserved) => {
61+
await instance.pull("reserved").then((reserved) => {
6262
assertStrictEquals(reserved, "reserved");
6363
});
6464
});

0 commit comments

Comments
 (0)