Skip to main content
Module

x/evt/test/test92.ts

💧EventEmitter's typesafe replacement
Go to Latest
File
import { Evt } from "../lib/index.ts";import { assert } from "https://raw.githubusercontent.com/garronej/tsafe/v0.10.1/deno_dist/assert.ts";;
let stdout = "";
const evt = Evt.create();
(async ()=> {
await evt.waitFor();
stdout+= "bar";
})();

(async () => {
stdout += "foo";
await evt.postAndWait();
stdout += "baz";
assert(stdout === "foobarbaz");
console.log("PASS");
})();