ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
CI / Typecheck, test & build (push) Failing after 2s
This commit is contained in:
@@ -20,18 +20,29 @@ describe("inventory trust read-time computation", () => {
|
||||
.from(schema.users)
|
||||
.where(inArray(schema.users.email, [userEmail]));
|
||||
for (const u of existing) {
|
||||
await testDb.db.delete(schema.inventoryTransactions).where(eq(schema.inventoryTransactions.actorUserId, u.id));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryTransactions)
|
||||
.where(eq(schema.inventoryTransactions.actorUserId, u.id));
|
||||
const owned = await testDb.db
|
||||
.select({ id: schema.households.id })
|
||||
.from(schema.households)
|
||||
.innerJoin(schema.householdMembers, eq(schema.householdMembers.householdId, schema.households.id))
|
||||
.innerJoin(
|
||||
schema.householdMembers,
|
||||
eq(schema.householdMembers.householdId, schema.households.id),
|
||||
)
|
||||
.where(eq(schema.householdMembers.userId, u.id));
|
||||
for (const h of owned) {
|
||||
await testDb.db.delete(schema.inventoryItems).where(eq(schema.inventoryItems.householdId, h.id));
|
||||
await testDb.db.delete(schema.storageLocations).where(eq(schema.storageLocations.householdId, h.id));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryItems)
|
||||
.where(eq(schema.inventoryItems.householdId, h.id));
|
||||
await testDb.db
|
||||
.delete(schema.storageLocations)
|
||||
.where(eq(schema.storageLocations.householdId, h.id));
|
||||
await testDb.db.delete(schema.households).where(eq(schema.households.id, h.id));
|
||||
}
|
||||
await testDb.db.delete(schema.householdMembers).where(eq(schema.householdMembers.userId, u.id));
|
||||
await testDb.db
|
||||
.delete(schema.householdMembers)
|
||||
.where(eq(schema.householdMembers.userId, u.id));
|
||||
await testDb.db.delete(schema.userPreferences).where(eq(schema.userPreferences.userId, u.id));
|
||||
await testDb.db.delete(schema.users).where(eq(schema.users.id, u.id));
|
||||
}
|
||||
@@ -99,7 +110,9 @@ describe("inventory trust read-time computation", () => {
|
||||
});
|
||||
expect(res.statusCode).toBe(200);
|
||||
|
||||
const body = JSON.parse(res.body) as { items: Array<{ id: string; trustState: string; trustScore: number }> };
|
||||
const body = JSON.parse(res.body) as {
|
||||
items: Array<{ id: string; trustState: string; trustScore: number }>;
|
||||
};
|
||||
const found = body.items.find((i) => i.id === item!.id);
|
||||
expect(found).toBeTruthy();
|
||||
expect(["decaying", "stale"]).toContain(found!.trustState);
|
||||
|
||||
Reference in New Issue
Block a user