MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / insertKiloPassSubscription

Function insertKiloPassSubscription

packages/db/src/schema.test.ts:41–65  ·  view source on GitHub ↗
(values: {
  userId: string;
  paymentProvider: KiloPassPaymentProvider;
  providerSubscriptionId: string | null;
  stripeSubscriptionId: string | null;
})

Source from the content-addressed store, hash-verified

39 google_user_image_url: '',
40 stripe_customer_id: `cus_${crypto.randomUUID()}`,
41 })
42 .returning();
43 expect(user.api_token_pepper).toMatch(
44 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
45 );
46 } finally {
47 await schemaTestDb.db
48 .delete(schema.kilocode_users)
49 .where(eq(schema.kilocode_users.id, pepperUserId));
50 }
51 });
52});
53
54describe('cloud agent stacked workspace schema', () => {
55 let userId: string;
56 let otherUserId: string;
57 let organizationId: string;
58 let otherOrganizationId: string;
59
60 beforeEach(async () => {
61 userId = `oauth/schema-sidebar-${crypto.randomUUID()}`;
62 otherUserId = `oauth/schema-sidebar-${crypto.randomUUID()}`;
63 organizationId = crypto.randomUUID();
64 otherOrganizationId = crypto.randomUUID();
65 await schemaTestDb.db.insert(schema.kilocode_users).values(
66 [userId, otherUserId].map(id => ({
67 id,
68 google_user_email: `${id}@example.com`,

Callers 1

schema.test.tsFile · 0.70

Calls 1

valuesMethod · 0.65

Tested by

no test coverage detected