@molecule/api-resource-payment 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/dist/__tests__/index.test.d.ts +0 -5
- package/dist/__tests__/index.test.d.ts.map +0 -1
- package/dist/__tests__/index.test.js +0 -85
- package/dist/__tests__/index.test.js.map +0 -1
- package/dist/__tests__/planService.test.d.ts +0 -5
- package/dist/__tests__/planService.test.d.ts.map +0 -1
- package/dist/__tests__/planService.test.js +0 -166
- package/dist/__tests__/planService.test.js.map +0 -1
- package/dist/__tests__/plans.test.d.ts +0 -5
- package/dist/__tests__/plans.test.d.ts.map +0 -1
- package/dist/__tests__/plans.test.js +0 -296
- package/dist/__tests__/plans.test.js.map +0 -1
- package/dist/__tests__/recordService.test.d.ts +0 -5
- package/dist/__tests__/recordService.test.d.ts.map +0 -1
- package/dist/__tests__/recordService.test.js +0 -214
- package/dist/__tests__/recordService.test.js.map +0 -1
- package/dist/__tests__/resource.test.d.ts +0 -5
- package/dist/__tests__/resource.test.d.ts.map +0 -1
- package/dist/__tests__/resource.test.js +0 -56
- package/dist/__tests__/resource.test.js.map +0 -1
- package/dist/__tests__/schema.test.d.ts +0 -5
- package/dist/__tests__/schema.test.d.ts.map +0 -1
- package/dist/__tests__/schema.test.js +0 -275
- package/dist/__tests__/schema.test.js.map +0 -1
- package/dist/__tests__/utilities.test.d.ts +0 -5
- package/dist/__tests__/utilities.test.d.ts.map +0 -1
- package/dist/__tests__/utilities.test.js +0 -59
- package/dist/__tests__/utilities.test.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/api-resource-payment",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Payment resource with subscription plan management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@molecule/api-bond": "1.0.4",
|
|
30
|
-
"@molecule/api-locales-payment": "1.0.
|
|
30
|
+
"@molecule/api-locales-payment": "1.0.3",
|
|
31
31
|
"@molecule/api-payments": "1.2.3",
|
|
32
32
|
"@types/node": "26.6.5",
|
|
33
33
|
"typescript": "6.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the Payment resource package exports.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
5
|
-
// Mock @molecule/api-database
|
|
6
|
-
vi.mock('@molecule/api-database', () => ({
|
|
7
|
-
query: vi.fn(),
|
|
8
|
-
}));
|
|
9
|
-
// Mock @molecule/api-bond (recordService uses getLogger and getAnalytics from api-bond)
|
|
10
|
-
vi.mock('@molecule/api-bond', () => ({
|
|
11
|
-
getAnalytics: () => ({
|
|
12
|
-
identify: vi.fn().mockResolvedValue(undefined),
|
|
13
|
-
track: vi.fn().mockResolvedValue(undefined),
|
|
14
|
-
page: vi.fn().mockResolvedValue(undefined),
|
|
15
|
-
}),
|
|
16
|
-
getLogger: () => ({
|
|
17
|
-
info: vi.fn(),
|
|
18
|
-
warn: vi.fn(),
|
|
19
|
-
error: vi.fn(),
|
|
20
|
-
debug: vi.fn(),
|
|
21
|
-
trace: vi.fn(),
|
|
22
|
-
}),
|
|
23
|
-
get: vi.fn(),
|
|
24
|
-
set: vi.fn(),
|
|
25
|
-
getAll: vi.fn(),
|
|
26
|
-
}));
|
|
27
|
-
// Mock the i18n module to avoid dynamic import of unbuilt locale packages
|
|
28
|
-
vi.mock('../i18n.js', () => ({
|
|
29
|
-
i18nRegistered: true,
|
|
30
|
-
}));
|
|
31
|
-
import * as PaymentModule from '../index.js';
|
|
32
|
-
describe('Payment package exports', () => {
|
|
33
|
-
it('should export resource', () => {
|
|
34
|
-
expect(PaymentModule.resource).toBeDefined();
|
|
35
|
-
expect(PaymentModule.resource.name).toBe('Payment');
|
|
36
|
-
expect(PaymentModule.resource.tableName).toBe('payments');
|
|
37
|
-
});
|
|
38
|
-
it('should export plans', () => {
|
|
39
|
-
expect(PaymentModule.plans).toBeDefined();
|
|
40
|
-
expect(typeof PaymentModule.plans).toBe('object');
|
|
41
|
-
});
|
|
42
|
-
it('should export individual plan definitions', () => {
|
|
43
|
-
expect(PaymentModule.stripeMonthly).toBeDefined();
|
|
44
|
-
expect(PaymentModule.stripeYearly).toBeDefined();
|
|
45
|
-
expect(PaymentModule.appleMonthly).toBeDefined();
|
|
46
|
-
expect(PaymentModule.appleYearly).toBeDefined();
|
|
47
|
-
expect(PaymentModule.googleMonthly).toBeDefined();
|
|
48
|
-
expect(PaymentModule.googleYearly).toBeDefined();
|
|
49
|
-
});
|
|
50
|
-
it('should export getPeriodTime utility', () => {
|
|
51
|
-
expect(PaymentModule.getPeriodTime).toBeDefined();
|
|
52
|
-
expect(typeof PaymentModule.getPeriodTime).toBe('function');
|
|
53
|
-
});
|
|
54
|
-
it('should export types namespace', () => {
|
|
55
|
-
expect(PaymentModule.types).toBeDefined();
|
|
56
|
-
});
|
|
57
|
-
it('should export propsSchema', () => {
|
|
58
|
-
expect(PaymentModule.propsSchema).toBeDefined();
|
|
59
|
-
expect(PaymentModule.propsSchema.safeParse).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
it('should export createPropsSchema', () => {
|
|
62
|
-
expect(PaymentModule.createPropsSchema).toBeDefined();
|
|
63
|
-
expect(PaymentModule.createPropsSchema.safeParse).toBeDefined();
|
|
64
|
-
});
|
|
65
|
-
it('should export updatePropsSchema', () => {
|
|
66
|
-
expect(PaymentModule.updatePropsSchema).toBeDefined();
|
|
67
|
-
expect(PaymentModule.updatePropsSchema.safeParse).toBeDefined();
|
|
68
|
-
});
|
|
69
|
-
it('should export planService', () => {
|
|
70
|
-
expect(PaymentModule.planService).toBeDefined();
|
|
71
|
-
expect(typeof PaymentModule.planService.findPlan).toBe('function');
|
|
72
|
-
expect(typeof PaymentModule.planService.findPlanByProductId).toBe('function');
|
|
73
|
-
expect(typeof PaymentModule.planService.getDefaultPlan).toBe('function');
|
|
74
|
-
expect(typeof PaymentModule.planService.getAllPlans).toBe('function');
|
|
75
|
-
});
|
|
76
|
-
it('should export paymentRecordService', () => {
|
|
77
|
-
expect(PaymentModule.paymentRecordService).toBeDefined();
|
|
78
|
-
expect(typeof PaymentModule.paymentRecordService.store).toBe('function');
|
|
79
|
-
expect(typeof PaymentModule.paymentRecordService.findByTransaction).toBe('function');
|
|
80
|
-
expect(typeof PaymentModule.paymentRecordService.findByCustomerData).toBe('function');
|
|
81
|
-
expect(typeof PaymentModule.paymentRecordService.findByUserId).toBe('function');
|
|
82
|
-
expect(typeof PaymentModule.paymentRecordService.deleteByUserId).toBe('function');
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,8BAA8B;AAC9B,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC;IACvC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;CACf,CAAC,CAAC,CAAA;AAEH,wFAAwF;AACxF,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACnC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;QACnB,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAA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AAa,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACrF,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC/E,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACnF,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planService.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/planService.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the planService (PlanService bond implementation).
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it } from 'vitest';
|
|
5
|
-
import { appleMonthly, appleYearly, googleMonthly, googleYearly, plans, registerPlans, stripeMonthly, stripeYearly, } from '../plans.js';
|
|
6
|
-
import { planService } from '../planService.js';
|
|
7
|
-
describe('planService.findPlan', () => {
|
|
8
|
-
it('should find the default plan by empty string key', () => {
|
|
9
|
-
const result = planService.findPlan('');
|
|
10
|
-
expect(result).not.toBeNull();
|
|
11
|
-
expect(result.planKey).toBe('');
|
|
12
|
-
expect(result.title).toBe('Free');
|
|
13
|
-
});
|
|
14
|
-
it('should find stripeMonthly by key', () => {
|
|
15
|
-
const result = planService.findPlan('stripeMonthly');
|
|
16
|
-
expect(result).not.toBeNull();
|
|
17
|
-
expect(result).toBe(stripeMonthly);
|
|
18
|
-
});
|
|
19
|
-
it('should find stripeYearly by key', () => {
|
|
20
|
-
const result = planService.findPlan('stripeYearly');
|
|
21
|
-
expect(result).not.toBeNull();
|
|
22
|
-
expect(result).toBe(stripeYearly);
|
|
23
|
-
});
|
|
24
|
-
it('should find appleMonthly by key', () => {
|
|
25
|
-
const result = planService.findPlan('appleMonthly');
|
|
26
|
-
expect(result).not.toBeNull();
|
|
27
|
-
expect(result).toBe(appleMonthly);
|
|
28
|
-
});
|
|
29
|
-
it('should find appleYearly by key', () => {
|
|
30
|
-
const result = planService.findPlan('appleYearly');
|
|
31
|
-
expect(result).not.toBeNull();
|
|
32
|
-
expect(result).toBe(appleYearly);
|
|
33
|
-
});
|
|
34
|
-
it('should find googleMonthly by key', () => {
|
|
35
|
-
const result = planService.findPlan('googleMonthly');
|
|
36
|
-
expect(result).not.toBeNull();
|
|
37
|
-
expect(result).toBe(googleMonthly);
|
|
38
|
-
});
|
|
39
|
-
it('should find googleYearly by key', () => {
|
|
40
|
-
const result = planService.findPlan('googleYearly');
|
|
41
|
-
expect(result).not.toBeNull();
|
|
42
|
-
expect(result).toBe(googleYearly);
|
|
43
|
-
});
|
|
44
|
-
it('should return null for a nonexistent plan key', () => {
|
|
45
|
-
const result = planService.findPlan('nonexistent');
|
|
46
|
-
expect(result).toBeNull();
|
|
47
|
-
});
|
|
48
|
-
it('should return null for undefined-like keys', () => {
|
|
49
|
-
const result = planService.findPlan('undefined');
|
|
50
|
-
expect(result).toBeNull();
|
|
51
|
-
});
|
|
52
|
-
it('should be case-sensitive', () => {
|
|
53
|
-
const result = planService.findPlan('STRIPEMONTHLY');
|
|
54
|
-
expect(result).toBeNull();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('planService.findPlanByProductId', () => {
|
|
58
|
-
it('should find stripeMonthly by productId', () => {
|
|
59
|
-
const result = planService.findPlanByProductId(stripeMonthly.platformProductId);
|
|
60
|
-
expect(result).not.toBeNull();
|
|
61
|
-
expect(result.planKey).toBe('stripeMonthly');
|
|
62
|
-
});
|
|
63
|
-
it('should find appleMonthly by productId', () => {
|
|
64
|
-
const result = planService.findPlanByProductId('molecule_monthly_early_adopter');
|
|
65
|
-
expect(result).not.toBeNull();
|
|
66
|
-
expect(result.planKey).toBe('appleMonthly');
|
|
67
|
-
});
|
|
68
|
-
it('should find appleYearly by productId', () => {
|
|
69
|
-
const result = planService.findPlanByProductId('molecule_yearly_early_adopter');
|
|
70
|
-
expect(result).not.toBeNull();
|
|
71
|
-
expect(result.planKey).toBe('appleYearly');
|
|
72
|
-
});
|
|
73
|
-
it('should find googleMonthly by productId', () => {
|
|
74
|
-
const result = planService.findPlanByProductId('monthly_early_adopter');
|
|
75
|
-
expect(result).not.toBeNull();
|
|
76
|
-
expect(result.planKey).toBe('googleMonthly');
|
|
77
|
-
});
|
|
78
|
-
it('should find googleYearly by productId', () => {
|
|
79
|
-
const result = planService.findPlanByProductId('yearly_early_adopter');
|
|
80
|
-
expect(result).not.toBeNull();
|
|
81
|
-
expect(result.planKey).toBe('googleYearly');
|
|
82
|
-
});
|
|
83
|
-
it('should return null for a nonexistent productId', () => {
|
|
84
|
-
const result = planService.findPlanByProductId('nonexistent_product');
|
|
85
|
-
expect(result).toBeNull();
|
|
86
|
-
});
|
|
87
|
-
it('should return null for an empty string productId', () => {
|
|
88
|
-
// The default (free) plan's platformProductId is '' — but an EMPTY
|
|
89
|
-
// platform identifier from a provider must never resolve to a plan
|
|
90
|
-
// grant. Matching '' against the free plan was an accident of the old
|
|
91
|
-
// `===` comparison; findPlanByProductId now explicitly rejects empty
|
|
92
|
-
// input and empty platformProductId values.
|
|
93
|
-
const result = planService.findPlanByProductId('');
|
|
94
|
-
expect(result).toBeNull();
|
|
95
|
-
});
|
|
96
|
-
it('should find a plan by a registered platform PRICE id', () => {
|
|
97
|
-
registerPlans({
|
|
98
|
-
customPro: {
|
|
99
|
-
planKey: 'customPro',
|
|
100
|
-
platformKey: 'stripe',
|
|
101
|
-
platformProductId: '',
|
|
102
|
-
platformPriceIds: ['price_custom_pro_monthly'],
|
|
103
|
-
alias: 'monthly',
|
|
104
|
-
period: 'month',
|
|
105
|
-
price: '$12',
|
|
106
|
-
autoRenews: true,
|
|
107
|
-
title: 'Pro',
|
|
108
|
-
titleKey: '',
|
|
109
|
-
description: 'Pro',
|
|
110
|
-
descriptionKey: '',
|
|
111
|
-
capabilities: { premium: true },
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
const result = planService.findPlanByProductId('price_custom_pro_monthly');
|
|
115
|
-
expect(result).not.toBeNull();
|
|
116
|
-
expect(result.planKey).toBe('customPro');
|
|
117
|
-
// An empty platformProductId on the registered plan must not match ''.
|
|
118
|
-
expect(planService.findPlanByProductId('')).toBeNull();
|
|
119
|
-
delete plans.customPro;
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
describe('planService.getDefaultPlan', () => {
|
|
123
|
-
it('should return the default (free) plan', () => {
|
|
124
|
-
const result = planService.getDefaultPlan();
|
|
125
|
-
expect(result).not.toBeNull();
|
|
126
|
-
expect(result.planKey).toBe('');
|
|
127
|
-
expect(result.title).toBe('Free');
|
|
128
|
-
expect(result.capabilities.premium).toBe(false);
|
|
129
|
-
});
|
|
130
|
-
it('should return the same plan as findPlan with empty string', () => {
|
|
131
|
-
const defaultPlan = planService.getDefaultPlan();
|
|
132
|
-
const foundPlan = planService.findPlan('');
|
|
133
|
-
expect(defaultPlan).toBe(foundPlan);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
describe('planService.getAllPlans', () => {
|
|
137
|
-
it('should return all plans', () => {
|
|
138
|
-
const result = planService.getAllPlans();
|
|
139
|
-
expect(result).toHaveLength(7);
|
|
140
|
-
});
|
|
141
|
-
it('should return an array', () => {
|
|
142
|
-
const result = planService.getAllPlans();
|
|
143
|
-
expect(Array.isArray(result)).toBe(true);
|
|
144
|
-
});
|
|
145
|
-
it('should contain the default plan', () => {
|
|
146
|
-
const result = planService.getAllPlans();
|
|
147
|
-
const defaultPlan = result.find((p) => p.planKey === '');
|
|
148
|
-
expect(defaultPlan).toBeDefined();
|
|
149
|
-
});
|
|
150
|
-
it('should contain all platform plans', () => {
|
|
151
|
-
const result = planService.getAllPlans();
|
|
152
|
-
const planKeys = result.map((p) => p.planKey);
|
|
153
|
-
expect(planKeys).toContain('stripeMonthly');
|
|
154
|
-
expect(planKeys).toContain('stripeYearly');
|
|
155
|
-
expect(planKeys).toContain('appleMonthly');
|
|
156
|
-
expect(planKeys).toContain('appleYearly');
|
|
157
|
-
expect(planKeys).toContain('googleMonthly');
|
|
158
|
-
expect(planKeys).toContain('googleYearly');
|
|
159
|
-
});
|
|
160
|
-
it('should return plans that match the plans record', () => {
|
|
161
|
-
const result = planService.getAllPlans();
|
|
162
|
-
const planValues = Object.values(plans);
|
|
163
|
-
expect(result).toEqual(planValues);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
//# sourceMappingURL=planService.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planService.test.js","sourceRoot":"","sources":["../../src/__tests__/planService.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,KAAK,EACL,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC1D,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QACvC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,CAAC,MAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAChC,MAAM,CAAC,MAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,MAAM,GAAG,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CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plans.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/plans.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the plans definitions.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it } from 'vitest';
|
|
5
|
-
import { appleMonthly, appleYearly, googleMonthly, googleYearly, plans, stripeMonthly, stripeYearly, } from '../plans.js';
|
|
6
|
-
describe('plans record', () => {
|
|
7
|
-
it('should contain exactly 7 plans', () => {
|
|
8
|
-
expect(Object.keys(plans)).toHaveLength(7);
|
|
9
|
-
});
|
|
10
|
-
it('should contain the default plan keyed by empty string', () => {
|
|
11
|
-
expect(plans['']).toBeDefined();
|
|
12
|
-
});
|
|
13
|
-
it('should contain stripeMonthly', () => {
|
|
14
|
-
expect(plans['stripeMonthly']).toBeDefined();
|
|
15
|
-
expect(plans['stripeMonthly']).toBe(stripeMonthly);
|
|
16
|
-
});
|
|
17
|
-
it('should contain stripeYearly', () => {
|
|
18
|
-
expect(plans['stripeYearly']).toBeDefined();
|
|
19
|
-
expect(plans['stripeYearly']).toBe(stripeYearly);
|
|
20
|
-
});
|
|
21
|
-
it('should contain appleMonthly', () => {
|
|
22
|
-
expect(plans['appleMonthly']).toBeDefined();
|
|
23
|
-
expect(plans['appleMonthly']).toBe(appleMonthly);
|
|
24
|
-
});
|
|
25
|
-
it('should contain appleYearly', () => {
|
|
26
|
-
expect(plans['appleYearly']).toBeDefined();
|
|
27
|
-
expect(plans['appleYearly']).toBe(appleYearly);
|
|
28
|
-
});
|
|
29
|
-
it('should contain googleMonthly', () => {
|
|
30
|
-
expect(plans['googleMonthly']).toBeDefined();
|
|
31
|
-
expect(plans['googleMonthly']).toBe(googleMonthly);
|
|
32
|
-
});
|
|
33
|
-
it('should contain googleYearly', () => {
|
|
34
|
-
expect(plans['googleYearly']).toBeDefined();
|
|
35
|
-
expect(plans['googleYearly']).toBe(googleYearly);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
describe('default plan', () => {
|
|
39
|
-
const defaultPlan = plans[''];
|
|
40
|
-
it('should have empty planKey', () => {
|
|
41
|
-
expect(defaultPlan.planKey).toBe('');
|
|
42
|
-
});
|
|
43
|
-
it('should have empty platformKey', () => {
|
|
44
|
-
expect(defaultPlan.platformKey).toBe('');
|
|
45
|
-
});
|
|
46
|
-
it('should have empty platformProductId', () => {
|
|
47
|
-
expect(defaultPlan.platformProductId).toBe('');
|
|
48
|
-
});
|
|
49
|
-
it('should have empty alias', () => {
|
|
50
|
-
expect(defaultPlan.alias).toBe('');
|
|
51
|
-
});
|
|
52
|
-
it('should have empty period', () => {
|
|
53
|
-
expect(defaultPlan.period).toBe('');
|
|
54
|
-
});
|
|
55
|
-
it('should have empty price', () => {
|
|
56
|
-
expect(defaultPlan.price).toBe('');
|
|
57
|
-
});
|
|
58
|
-
it('should have title "Free"', () => {
|
|
59
|
-
expect(defaultPlan.title).toBe('Free');
|
|
60
|
-
});
|
|
61
|
-
it('should have a description', () => {
|
|
62
|
-
expect(defaultPlan.description).toBeTruthy();
|
|
63
|
-
expect(defaultPlan.description).toContain('limited');
|
|
64
|
-
});
|
|
65
|
-
it('should have a shortDescription', () => {
|
|
66
|
-
expect(defaultPlan.shortDescription).toBeTruthy();
|
|
67
|
-
});
|
|
68
|
-
it('should not be premium', () => {
|
|
69
|
-
expect(defaultPlan.capabilities.premium).toBe(false);
|
|
70
|
-
});
|
|
71
|
-
it('should not have autoRenews property', () => {
|
|
72
|
-
expect(defaultPlan.autoRenews).toBeUndefined();
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
describe('stripeMonthly plan', () => {
|
|
76
|
-
it('should have planKey "stripeMonthly"', () => {
|
|
77
|
-
expect(stripeMonthly.planKey).toBe('stripeMonthly');
|
|
78
|
-
});
|
|
79
|
-
it('should have platformKey "stripe"', () => {
|
|
80
|
-
expect(stripeMonthly.platformKey).toBe('stripe');
|
|
81
|
-
});
|
|
82
|
-
it('should have a platformProductId', () => {
|
|
83
|
-
expect(stripeMonthly.platformProductId).toBeTruthy();
|
|
84
|
-
});
|
|
85
|
-
it('should have alias "monthly"', () => {
|
|
86
|
-
expect(stripeMonthly.alias).toBe('monthly');
|
|
87
|
-
});
|
|
88
|
-
it('should have period "month"', () => {
|
|
89
|
-
expect(stripeMonthly.period).toBe('month');
|
|
90
|
-
});
|
|
91
|
-
it('should have a price', () => {
|
|
92
|
-
expect(stripeMonthly.price).toBe('$5');
|
|
93
|
-
});
|
|
94
|
-
it('should auto-renew', () => {
|
|
95
|
-
expect(stripeMonthly.autoRenews).toBe(true);
|
|
96
|
-
});
|
|
97
|
-
it('should have title "Monthly"', () => {
|
|
98
|
-
expect(stripeMonthly.title).toBe('Monthly');
|
|
99
|
-
});
|
|
100
|
-
it('should be premium', () => {
|
|
101
|
-
expect(stripeMonthly.capabilities.premium).toBe(true);
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
describe('stripeYearly plan', () => {
|
|
105
|
-
it('should have planKey "stripeYearly"', () => {
|
|
106
|
-
expect(stripeYearly.planKey).toBe('stripeYearly');
|
|
107
|
-
});
|
|
108
|
-
it('should have platformKey "stripe"', () => {
|
|
109
|
-
expect(stripeYearly.platformKey).toBe('stripe');
|
|
110
|
-
});
|
|
111
|
-
it('should have alias "yearly"', () => {
|
|
112
|
-
expect(stripeYearly.alias).toBe('yearly');
|
|
113
|
-
});
|
|
114
|
-
it('should have period "year"', () => {
|
|
115
|
-
expect(stripeYearly.period).toBe('year');
|
|
116
|
-
});
|
|
117
|
-
it('should have a price', () => {
|
|
118
|
-
expect(stripeYearly.price).toBe('$55');
|
|
119
|
-
});
|
|
120
|
-
it('should auto-renew', () => {
|
|
121
|
-
expect(stripeYearly.autoRenews).toBe(true);
|
|
122
|
-
});
|
|
123
|
-
it('should have title "Yearly"', () => {
|
|
124
|
-
expect(stripeYearly.title).toBe('Yearly');
|
|
125
|
-
});
|
|
126
|
-
it('should be premium', () => {
|
|
127
|
-
expect(stripeYearly.capabilities.premium).toBe(true);
|
|
128
|
-
});
|
|
129
|
-
it('should have highlightedDescription', () => {
|
|
130
|
-
expect(stripeYearly.highlightedDescription).toBeTruthy();
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
describe('appleMonthly plan', () => {
|
|
134
|
-
it('should have planKey "appleMonthly"', () => {
|
|
135
|
-
expect(appleMonthly.planKey).toBe('appleMonthly');
|
|
136
|
-
});
|
|
137
|
-
it('should have platformKey "apple"', () => {
|
|
138
|
-
expect(appleMonthly.platformKey).toBe('apple');
|
|
139
|
-
});
|
|
140
|
-
it('should have platformProductId "molecule_monthly_early_adopter"', () => {
|
|
141
|
-
expect(appleMonthly.platformProductId).toBe('molecule_monthly_early_adopter');
|
|
142
|
-
});
|
|
143
|
-
it('should have alias "monthly"', () => {
|
|
144
|
-
expect(appleMonthly.alias).toBe('monthly');
|
|
145
|
-
});
|
|
146
|
-
it('should have period "month"', () => {
|
|
147
|
-
expect(appleMonthly.period).toBe('month');
|
|
148
|
-
});
|
|
149
|
-
it('should have price "$5.99"', () => {
|
|
150
|
-
expect(appleMonthly.price).toBe('$5.99');
|
|
151
|
-
});
|
|
152
|
-
it('should auto-renew', () => {
|
|
153
|
-
expect(appleMonthly.autoRenews).toBe(true);
|
|
154
|
-
});
|
|
155
|
-
it('should be premium', () => {
|
|
156
|
-
expect(appleMonthly.capabilities.premium).toBe(true);
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
describe('appleYearly plan', () => {
|
|
160
|
-
it('should have planKey "appleYearly"', () => {
|
|
161
|
-
expect(appleYearly.planKey).toBe('appleYearly');
|
|
162
|
-
});
|
|
163
|
-
it('should have platformKey "apple"', () => {
|
|
164
|
-
expect(appleYearly.platformKey).toBe('apple');
|
|
165
|
-
});
|
|
166
|
-
it('should have platformProductId "molecule_yearly_early_adopter"', () => {
|
|
167
|
-
expect(appleYearly.platformProductId).toBe('molecule_yearly_early_adopter');
|
|
168
|
-
});
|
|
169
|
-
it('should have alias "yearly"', () => {
|
|
170
|
-
expect(appleYearly.alias).toBe('yearly');
|
|
171
|
-
});
|
|
172
|
-
it('should have period "year"', () => {
|
|
173
|
-
expect(appleYearly.period).toBe('year');
|
|
174
|
-
});
|
|
175
|
-
it('should have price "$64.99"', () => {
|
|
176
|
-
expect(appleYearly.price).toBe('$64.99');
|
|
177
|
-
});
|
|
178
|
-
it('should auto-renew', () => {
|
|
179
|
-
expect(appleYearly.autoRenews).toBe(true);
|
|
180
|
-
});
|
|
181
|
-
it('should be premium', () => {
|
|
182
|
-
expect(appleYearly.capabilities.premium).toBe(true);
|
|
183
|
-
});
|
|
184
|
-
it('should have highlightedDescription', () => {
|
|
185
|
-
expect(appleYearly.highlightedDescription).toBeTruthy();
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
describe('googleMonthly plan', () => {
|
|
189
|
-
it('should have planKey "googleMonthly"', () => {
|
|
190
|
-
expect(googleMonthly.planKey).toBe('googleMonthly');
|
|
191
|
-
});
|
|
192
|
-
it('should have platformKey "google"', () => {
|
|
193
|
-
expect(googleMonthly.platformKey).toBe('google');
|
|
194
|
-
});
|
|
195
|
-
it('should have platformProductId "monthly_early_adopter"', () => {
|
|
196
|
-
expect(googleMonthly.platformProductId).toBe('monthly_early_adopter');
|
|
197
|
-
});
|
|
198
|
-
it('should have alias "monthly"', () => {
|
|
199
|
-
expect(googleMonthly.alias).toBe('monthly');
|
|
200
|
-
});
|
|
201
|
-
it('should have period "month"', () => {
|
|
202
|
-
expect(googleMonthly.period).toBe('month');
|
|
203
|
-
});
|
|
204
|
-
it('should have price "$5.99"', () => {
|
|
205
|
-
expect(googleMonthly.price).toBe('$5.99');
|
|
206
|
-
});
|
|
207
|
-
it('should auto-renew', () => {
|
|
208
|
-
expect(googleMonthly.autoRenews).toBe(true);
|
|
209
|
-
});
|
|
210
|
-
it('should be premium', () => {
|
|
211
|
-
expect(googleMonthly.capabilities.premium).toBe(true);
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
describe('googleYearly plan', () => {
|
|
215
|
-
it('should have planKey "googleYearly"', () => {
|
|
216
|
-
expect(googleYearly.planKey).toBe('googleYearly');
|
|
217
|
-
});
|
|
218
|
-
it('should have platformKey "google"', () => {
|
|
219
|
-
expect(googleYearly.platformKey).toBe('google');
|
|
220
|
-
});
|
|
221
|
-
it('should have platformProductId "yearly_early_adopter"', () => {
|
|
222
|
-
expect(googleYearly.platformProductId).toBe('yearly_early_adopter');
|
|
223
|
-
});
|
|
224
|
-
it('should have alias "yearly"', () => {
|
|
225
|
-
expect(googleYearly.alias).toBe('yearly');
|
|
226
|
-
});
|
|
227
|
-
it('should have period "year"', () => {
|
|
228
|
-
expect(googleYearly.period).toBe('year');
|
|
229
|
-
});
|
|
230
|
-
it('should have price "$64.99"', () => {
|
|
231
|
-
expect(googleYearly.price).toBe('$64.99');
|
|
232
|
-
});
|
|
233
|
-
it('should auto-renew', () => {
|
|
234
|
-
expect(googleYearly.autoRenews).toBe(true);
|
|
235
|
-
});
|
|
236
|
-
it('should be premium', () => {
|
|
237
|
-
expect(googleYearly.capabilities.premium).toBe(true);
|
|
238
|
-
});
|
|
239
|
-
it('should have highlightedDescription', () => {
|
|
240
|
-
expect(googleYearly.highlightedDescription).toBeTruthy();
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
describe('plan structure consistency', () => {
|
|
244
|
-
const allPlans = Object.values(plans);
|
|
245
|
-
it('every plan should have required fields', () => {
|
|
246
|
-
for (const plan of allPlans) {
|
|
247
|
-
expect(plan.planKey).toBeDefined();
|
|
248
|
-
expect(plan.platformKey).toBeDefined();
|
|
249
|
-
expect(plan.platformProductId).toBeDefined();
|
|
250
|
-
expect(plan.alias).toBeDefined();
|
|
251
|
-
expect(plan.period).toBeDefined();
|
|
252
|
-
expect(plan.price).toBeDefined();
|
|
253
|
-
expect(plan.title).toBeDefined();
|
|
254
|
-
expect(plan.description).toBeDefined();
|
|
255
|
-
expect(plan.capabilities).toBeDefined();
|
|
256
|
-
expect(typeof plan.capabilities.premium).toBe('boolean');
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
it('premium plans should have autoRenews set to true', () => {
|
|
260
|
-
const premiumPlans = allPlans.filter((p) => p.capabilities.premium);
|
|
261
|
-
for (const plan of premiumPlans) {
|
|
262
|
-
expect(plan.autoRenews).toBe(true);
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
it('each plan should belong to a valid platform', () => {
|
|
266
|
-
const validPlatforms = ['', 'stripe', 'apple', 'google'];
|
|
267
|
-
for (const plan of allPlans) {
|
|
268
|
-
expect(validPlatforms).toContain(plan.platformKey);
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
it('each plan alias should be valid', () => {
|
|
272
|
-
const validAliases = ['', 'monthly', 'yearly'];
|
|
273
|
-
for (const plan of allPlans) {
|
|
274
|
-
expect(validAliases).toContain(plan.alias);
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
it('each plan period should be valid', () => {
|
|
278
|
-
const validPeriods = ['', 'month', 'year'];
|
|
279
|
-
for (const plan of allPlans) {
|
|
280
|
-
expect(validPeriods).toContain(plan.period);
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
it('stripe plans should have platformKey "stripe"', () => {
|
|
284
|
-
expect(stripeMonthly.platformKey).toBe('stripe');
|
|
285
|
-
expect(stripeYearly.platformKey).toBe('stripe');
|
|
286
|
-
});
|
|
287
|
-
it('apple plans should have platformKey "apple"', () => {
|
|
288
|
-
expect(appleMonthly.platformKey).toBe('apple');
|
|
289
|
-
expect(appleYearly.platformKey).toBe('apple');
|
|
290
|
-
});
|
|
291
|
-
it('google plans should have platformKey "google"', () => {
|
|
292
|
-
expect(googleMonthly.platformKey).toBe('google');
|
|
293
|
-
expect(googleYearly.platformKey).toBe('google');
|
|
294
|
-
});
|
|
295
|
-
});
|
|
296
|
-
//# sourceMappingURL=plans.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plans.test.js","sourceRoot":"","sources":["../../src/__tests__/plans.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,KAAK,EACL,aAAa,EACb,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IACjC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAC5C,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IACpD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;QAC3C,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,6BAA6B,EAAE,GAAG,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