added event related tests to mutator, fixed tests

This commit is contained in:
dswbx
2025-01-16 10:13:54 +01:00
parent aa4aca1a90
commit f47218708a

View File

@@ -1,4 +1,5 @@
import { afterAll, describe, expect, test } from "bun:test"; import { afterAll, describe, expect, test } from "bun:test";
import type { EventManager } from "../../../src/core/events";
import { import {
Entity, Entity,
EntityManager, EntityManager,
@@ -299,7 +300,7 @@ describe("[data] Mutator (Events)", async () => {
expect(events.has(MutatorEvents.MutatorDeleteAfter.slug)).toBeTrue(); expect(events.has(MutatorEvents.MutatorDeleteAfter.slug)).toBeTrue();
}); });
/*test("insertOne event return is respected", async () => { test("insertOne event return is respected", async () => {
const posts = proto.entity("posts", { const posts = proto.entity("posts", {
title: proto.text(), title: proto.text(),
views: proto.number() views: proto.number()
@@ -364,5 +365,5 @@ describe("[data] Mutator (Events)", async () => {
title: "test", title: "test",
views: 3 views: 3
}); });
});*/ });
}); });