Skip to content

Commit

Permalink
fix: test failed
Browse files Browse the repository at this point in the history
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
  • Loading branch information
apollo79 committed Sep 17, 2022
1 parent 49a5cda commit 3ee38ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EventEmitter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ Deno.test("EventEmitter", async (ctx) => {
}

await ctx.step("reserved events", async (ctx) => {
await ctx.step("listening is possible", () => {
await ctx.step("listening is possible", async () => {
const instance = new Implementing();

instance.once("reserved", (reserved) => {
await instance.pull("reserved").then((reserved) => {
assertStrictEquals(reserved, "reserved");
});
});
Expand Down

0 comments on commit 3ee38ad

Please sign in to comment.