fix prototype tests

This commit is contained in:
dswbx
2024-12-07 19:35:34 +01:00
parent 3932396084
commit 86a7bee3d9

View File

@@ -1,5 +1,4 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import { MediaField } from "../../src";
import { import {
BooleanField, BooleanField,
DateField, DateField,
@@ -30,6 +29,7 @@ import {
relation, relation,
text text
} from "../../src/data/prototype"; } from "../../src/data/prototype";
import { MediaField } from "../../src/media/MediaField";
describe("prototype", () => { describe("prototype", () => {
test("...", () => { test("...", () => {
@@ -76,7 +76,9 @@ describe("prototype", () => {
new DateField("created_at", { new DateField("created_at", {
type: "datetime" type: "datetime"
}), }),
// @ts-ignore
new MediaField("images", { entity: "posts" }), new MediaField("images", { entity: "posts" }),
// @ts-ignore
new MediaField("cover", { entity: "posts", max_items: 1 }) new MediaField("cover", { entity: "posts", max_items: 1 })
]); ]);