@tsed/formio
Version:
Formio package for Ts.ED framework
17 lines (13 loc) • 373 B
text/typescript
import {Store} from "@tsed/core";
import {OnHook} from "../domain/OnHook.js";
import {On} from "./on.js";
describe("@On", () => {
it("should register a hook listener", () => {
("custom")
class CustomEvent implements OnHook {
on() {}
}
const store = Store.from(CustomEvent);
expect(store.get("formio:on:name")).toEqual("custom");
});
});