extended dataapi tests

This commit is contained in:
dswbx
2025-01-17 05:02:26 +01:00
parent 8a6d8329f3
commit 2a015ba0a1
4 changed files with 64 additions and 9 deletions

View File

@@ -10,16 +10,11 @@ import {
WithBuilder
} from "../../../src/data";
import * as proto from "../../../src/data/prototype";
import { compileQb, prettyPrintQb } from "../../helper";
import { compileQb, prettyPrintQb, schemaToEm } from "../../helper";
import { getDummyConnection } from "../helper";
const { dummyConnection } = getDummyConnection();
function schemaToEm(s: ReturnType<(typeof proto)["em"]>): EntityManager<any> {
const { dummyConnection } = getDummyConnection();
return new EntityManager(Object.values(s.entities), dummyConnection, s.relations, s.indices);
}
describe("[data] WithBuilder", async () => {
test("validate withs", async () => {
const schema = proto.em(