(
db: SqliteTestFumaDb,
row: {
readonly rowId: string;
readonly tenant: string;
readonly subject: string;
readonly id: string;
readonly title?: string;
},
)
| 26 | ); |
| 27 | |
| 28 | const insertArtifact = ( |
| 29 | db: SqliteTestFumaDb, |
| 30 | row: { |
| 31 | readonly rowId: string; |
| 32 | readonly tenant: string; |
| 33 | readonly subject: string; |
| 34 | readonly id: string; |
| 35 | readonly title?: string; |
| 36 | }, |
| 37 | ): Promise<unknown> => |
| 38 | db.client.execute({ |
| 39 | sql: `INSERT INTO artifact (row_id, tenant, owner, subject, id, title, description, code, created_at, updated_at) |
| 40 | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, |
| 41 | args: [ |
| 42 | row.rowId, |
| 43 | row.tenant, |
| 44 | "user", |
| 45 | row.subject, |
| 46 | row.id, |
| 47 | row.title ?? "Dashboard", |
| 48 | null, |
| 49 | "export default function App() { return null; }", |
| 50 | Date.now(), |
| 51 | Date.now(), |
| 52 | ], |
| 53 | }); |
| 54 | |
| 55 | describe("artifact table", () => { |
| 56 | it.effect("is created by the runtime schema bring-up", () => |
no test coverage detected