Skip to content

Commit 2781e4e

Browse files
committed
feat(msw): Billing service mocks
1 parent d4057db commit 2781e4e

4 files changed

Lines changed: 1163 additions & 645 deletions

File tree

.changeset/soft-trains-grin.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/clerk-js/sandbox/scenarios/user-button-signed-in.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
BillingService,
23
clerkHandlers,
34
EnvironmentService,
45
SessionService,
@@ -10,11 +11,17 @@ import {
1011
export function UserButtonSignedIn(): MockScenario {
1112
const user = UserService.create();
1213
const session = SessionService.create(user);
14+
const plans = BillingService.createDefaultPlans();
15+
const subscription = BillingService.createSubscription(plans[1]);
1316

1417
setClerkState({
1518
environment: EnvironmentService.MULTI_SESSION,
1619
session,
1720
user,
21+
billing: {
22+
plans,
23+
subscription,
24+
},
1825
});
1926

2027
return {

0 commit comments

Comments
 (0)