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:
@@ -4,7 +4,13 @@
|
||||
*/
|
||||
import { describe, expect, it, beforeAll, afterAll } from "vitest";
|
||||
import { eq } from "drizzle-orm";
|
||||
import { createDatabase, closeDatabase, schema, isAnalyticsOptedIn, deleteUserAnalyticsEvents } from "@app/database";
|
||||
import {
|
||||
createDatabase,
|
||||
closeDatabase,
|
||||
schema,
|
||||
isAnalyticsOptedIn,
|
||||
deleteUserAnalyticsEvents,
|
||||
} from "@app/database";
|
||||
|
||||
const TEST_USER_EMAIL = "analytics-gdpr-test@example.invalid";
|
||||
|
||||
@@ -76,7 +82,11 @@ describe("analytics GDPR helpers", () => {
|
||||
// Insert a dummy event for the test user and another user.
|
||||
const [otherUser] = await db
|
||||
.insert(schema.users)
|
||||
.values({ email: "other-analytics-test@example.invalid", displayName: "Other", locale: "sv-SE" })
|
||||
.values({
|
||||
email: "other-analytics-test@example.invalid",
|
||||
displayName: "Other",
|
||||
locale: "sv-SE",
|
||||
})
|
||||
.returning({ id: schema.users.id });
|
||||
|
||||
await db.insert(schema.productAnalyticsEvents).values({
|
||||
@@ -99,7 +109,9 @@ describe("analytics GDPR helpers", () => {
|
||||
.where(eq(schema.productAnalyticsEvents.userId, otherUser!.id));
|
||||
expect(remaining).toHaveLength(1);
|
||||
|
||||
await db.delete(schema.productAnalyticsEvents).where(eq(schema.productAnalyticsEvents.userId, otherUser!.id));
|
||||
await db
|
||||
.delete(schema.productAnalyticsEvents)
|
||||
.where(eq(schema.productAnalyticsEvents.userId, otherUser!.id));
|
||||
await db.delete(schema.users).where(eq(schema.users.id, otherUser!.id));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user