business-as-code 2.1.3 → 2.3.0
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/CHANGELOG.md +10 -0
- package/README.md +2 -0
- package/package.json +16 -13
- package/src/dollar.ts +5 -2
- package/src/entities/organization.ts +31 -18
- package/src/goals.ts +78 -12
- package/src/index.ts +48 -18
- package/src/kpis.ts +62 -8
- package/src/metrics.ts +92 -79
- package/src/okrs.ts +120 -20
- package/src/organization.ts +12 -15
- package/src/process.ts +11 -12
- package/src/product.ts +8 -9
- package/src/queries.ts +238 -75
- package/src/roles.ts +62 -61
- package/src/workflow.ts +22 -15
- package/test/business.test.ts +282 -0
- package/test/dollar.test.ts +270 -0
- package/test/entities.test.ts +628 -0
- package/test/financials.test.ts +539 -0
- package/test/goals.test.ts +451 -0
- package/{src → test}/index.test.ts +1 -1
- package/test/kpis.test.ts +440 -0
- package/test/metrics.test.ts +744 -0
- package/test/okrs.test.ts +741 -0
- package/test/organization.test.ts +548 -0
- package/test/process.test.ts +503 -0
- package/test/product.test.ts +430 -0
- package/test/queries.test.ts +556 -0
- package/test/roles.test.ts +546 -0
- package/test/service.test.ts +450 -0
- package/test/types.test.ts +1141 -0
- package/test/vision.test.ts +214 -0
- package/test/workflow.test.ts +501 -0
- package/vitest.config.ts +47 -0
- package/.turbo/turbo-build.log +0 -5
- package/LICENSE +0 -21
- package/dist/business.d.ts +0 -62
- package/dist/business.d.ts.map +0 -1
- package/dist/business.js +0 -109
- package/dist/business.js.map +0 -1
- package/dist/canvas/activities.d.ts +0 -19
- package/dist/canvas/activities.d.ts.map +0 -1
- package/dist/canvas/activities.js +0 -20
- package/dist/canvas/activities.js.map +0 -1
- package/dist/canvas/channels.d.ts +0 -20
- package/dist/canvas/channels.d.ts.map +0 -1
- package/dist/canvas/channels.js +0 -21
- package/dist/canvas/channels.js.map +0 -1
- package/dist/canvas/relationships.d.ts +0 -20
- package/dist/canvas/relationships.d.ts.map +0 -1
- package/dist/canvas/relationships.js +0 -21
- package/dist/canvas/relationships.js.map +0 -1
- package/dist/canvas/resources.d.ts +0 -20
- package/dist/canvas/resources.d.ts.map +0 -1
- package/dist/canvas/resources.js +0 -30
- package/dist/canvas/resources.js.map +0 -1
- package/dist/canvas/revenue.d.ts +0 -22
- package/dist/canvas/revenue.d.ts.map +0 -1
- package/dist/canvas/revenue.js +0 -30
- package/dist/canvas/revenue.js.map +0 -1
- package/dist/canvas/segments.d.ts +0 -20
- package/dist/canvas/segments.d.ts.map +0 -1
- package/dist/canvas/segments.js +0 -28
- package/dist/canvas/segments.js.map +0 -1
- package/dist/canvas/types.d.ts +0 -232
- package/dist/canvas/types.d.ts.map +0 -1
- package/dist/canvas/types.js +0 -8
- package/dist/canvas/types.js.map +0 -1
- package/dist/canvas/value.d.ts +0 -20
- package/dist/canvas/value.d.ts.map +0 -1
- package/dist/canvas/value.js +0 -21
- package/dist/canvas/value.js.map +0 -1
- package/dist/dollar.d.ts +0 -60
- package/dist/dollar.d.ts.map +0 -1
- package/dist/dollar.js +0 -107
- package/dist/dollar.js.map +0 -1
- package/dist/entities/assets.d.ts +0 -21
- package/dist/entities/assets.d.ts.map +0 -1
- package/dist/entities/assets.js +0 -323
- package/dist/entities/assets.js.map +0 -1
- package/dist/entities/business.d.ts +0 -36
- package/dist/entities/business.d.ts.map +0 -1
- package/dist/entities/business.js +0 -370
- package/dist/entities/business.js.map +0 -1
- package/dist/entities/communication.d.ts +0 -21
- package/dist/entities/communication.d.ts.map +0 -1
- package/dist/entities/communication.js +0 -255
- package/dist/entities/communication.js.map +0 -1
- package/dist/entities/customers.d.ts +0 -58
- package/dist/entities/customers.d.ts.map +0 -1
- package/dist/entities/customers.js +0 -989
- package/dist/entities/customers.js.map +0 -1
- package/dist/entities/financials.d.ts +0 -59
- package/dist/entities/financials.d.ts.map +0 -1
- package/dist/entities/financials.js +0 -932
- package/dist/entities/financials.js.map +0 -1
- package/dist/entities/goals.d.ts +0 -58
- package/dist/entities/goals.d.ts.map +0 -1
- package/dist/entities/goals.js +0 -800
- package/dist/entities/goals.js.map +0 -1
- package/dist/entities/index.d.ts +0 -299
- package/dist/entities/index.d.ts.map +0 -1
- package/dist/entities/index.js +0 -198
- package/dist/entities/index.js.map +0 -1
- package/dist/entities/legal.d.ts +0 -21
- package/dist/entities/legal.d.ts.map +0 -1
- package/dist/entities/legal.js +0 -301
- package/dist/entities/legal.js.map +0 -1
- package/dist/entities/market.d.ts +0 -21
- package/dist/entities/market.d.ts.map +0 -1
- package/dist/entities/market.js +0 -301
- package/dist/entities/market.js.map +0 -1
- package/dist/entities/marketing.d.ts +0 -67
- package/dist/entities/marketing.d.ts.map +0 -1
- package/dist/entities/marketing.js +0 -1157
- package/dist/entities/marketing.js.map +0 -1
- package/dist/entities/offerings.d.ts +0 -51
- package/dist/entities/offerings.d.ts.map +0 -1
- package/dist/entities/offerings.js +0 -727
- package/dist/entities/offerings.js.map +0 -1
- package/dist/entities/operations.d.ts +0 -58
- package/dist/entities/operations.d.ts.map +0 -1
- package/dist/entities/operations.js +0 -787
- package/dist/entities/operations.js.map +0 -1
- package/dist/entities/organization.d.ts +0 -57
- package/dist/entities/organization.d.ts.map +0 -1
- package/dist/entities/organization.js +0 -807
- package/dist/entities/organization.js.map +0 -1
- package/dist/entities/partnerships.d.ts +0 -21
- package/dist/entities/partnerships.d.ts.map +0 -1
- package/dist/entities/partnerships.js +0 -300
- package/dist/entities/partnerships.js.map +0 -1
- package/dist/entities/planning.d.ts +0 -0
- package/dist/entities/planning.d.ts.map +0 -1
- package/dist/entities/planning.js +0 -271
- package/dist/entities/planning.js.map +0 -1
- package/dist/entities/projects.d.ts +0 -25
- package/dist/entities/projects.d.ts.map +0 -1
- package/dist/entities/projects.js +0 -349
- package/dist/entities/projects.js.map +0 -1
- package/dist/entities/risk.d.ts +0 -21
- package/dist/entities/risk.d.ts.map +0 -1
- package/dist/entities/risk.js +0 -293
- package/dist/entities/risk.js.map +0 -1
- package/dist/entities/sales.d.ts +0 -72
- package/dist/entities/sales.d.ts.map +0 -1
- package/dist/entities/sales.js +0 -1248
- package/dist/entities/sales.js.map +0 -1
- package/dist/financials.d.ts +0 -130
- package/dist/financials.d.ts.map +0 -1
- package/dist/financials.js +0 -297
- package/dist/financials.js.map +0 -1
- package/dist/goals.d.ts +0 -87
- package/dist/goals.d.ts.map +0 -1
- package/dist/goals.js +0 -215
- package/dist/goals.js.map +0 -1
- package/dist/index.d.ts +0 -97
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -132
- package/dist/index.js.map +0 -1
- package/dist/kpis.d.ts +0 -118
- package/dist/kpis.d.ts.map +0 -1
- package/dist/kpis.js +0 -232
- package/dist/kpis.js.map +0 -1
- package/dist/metrics.d.ts +0 -448
- package/dist/metrics.d.ts.map +0 -1
- package/dist/metrics.js +0 -325
- package/dist/metrics.js.map +0 -1
- package/dist/okrs.d.ts +0 -123
- package/dist/okrs.d.ts.map +0 -1
- package/dist/okrs.js +0 -269
- package/dist/okrs.js.map +0 -1
- package/dist/organization.d.ts +0 -585
- package/dist/organization.d.ts.map +0 -1
- package/dist/organization.js +0 -173
- package/dist/organization.js.map +0 -1
- package/dist/process.d.ts +0 -112
- package/dist/process.d.ts.map +0 -1
- package/dist/process.js +0 -241
- package/dist/process.js.map +0 -1
- package/dist/product.d.ts +0 -85
- package/dist/product.d.ts.map +0 -1
- package/dist/product.js +0 -145
- package/dist/product.js.map +0 -1
- package/dist/queries.d.ts +0 -304
- package/dist/queries.d.ts.map +0 -1
- package/dist/queries.js +0 -415
- package/dist/queries.js.map +0 -1
- package/dist/roles.d.ts +0 -340
- package/dist/roles.d.ts.map +0 -1
- package/dist/roles.js +0 -255
- package/dist/roles.js.map +0 -1
- package/dist/service.d.ts +0 -61
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -140
- package/dist/service.js.map +0 -1
- package/dist/types.d.ts +0 -459
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -5
- package/dist/types.js.map +0 -1
- package/dist/vision.d.ts +0 -38
- package/dist/vision.d.ts.map +0 -1
- package/dist/vision.js +0 -68
- package/dist/vision.js.map +0 -1
- package/dist/workflow.d.ts +0 -115
- package/dist/workflow.d.ts.map +0 -1
- package/dist/workflow.js +0 -247
- package/dist/workflow.js.map +0 -1
- package/src/business.js +0 -108
- package/src/canvas/activities.ts +0 -32
- package/src/canvas/canvas.ts +0 -482
- package/src/canvas/channels.ts +0 -34
- package/src/canvas/costs.ts +0 -43
- package/src/canvas/economics.ts +0 -99
- package/src/canvas/index.ts +0 -206
- package/src/canvas/partnerships.ts +0 -34
- package/src/canvas/projections.ts +0 -141
- package/src/canvas/relationships.ts +0 -34
- package/src/canvas/resources.ts +0 -43
- package/src/canvas/revenue.ts +0 -56
- package/src/canvas/segments.ts +0 -42
- package/src/canvas/types.ts +0 -363
- package/src/canvas/value.ts +0 -34
- package/src/dollar.js +0 -106
- package/src/entities/assets.js +0 -322
- package/src/entities/business.js +0 -369
- package/src/entities/communication.js +0 -254
- package/src/entities/customers.js +0 -988
- package/src/entities/financials.js +0 -931
- package/src/entities/goals.js +0 -799
- package/src/entities/index.js +0 -197
- package/src/entities/legal.js +0 -300
- package/src/entities/market.js +0 -300
- package/src/entities/marketing.js +0 -1156
- package/src/entities/offerings.js +0 -726
- package/src/entities/operations.js +0 -786
- package/src/entities/organization.js +0 -806
- package/src/entities/partnerships.js +0 -299
- package/src/entities/planning.js +0 -270
- package/src/entities/projects.js +0 -348
- package/src/entities/risk.js +0 -292
- package/src/entities/sales.js +0 -1247
- package/src/financials.js +0 -296
- package/src/goals.js +0 -214
- package/src/index.js +0 -131
- package/src/index.test.js +0 -274
- package/src/kpis.js +0 -231
- package/src/metrics.js +0 -324
- package/src/okrs.js +0 -268
- package/src/organization.js +0 -172
- package/src/process.js +0 -240
- package/src/product.js +0 -144
- package/src/queries.js +0 -414
- package/src/roles.js +0 -254
- package/src/service.js +0 -139
- package/src/types.js +0 -4
- package/src/vision.js +0 -67
- package/src/workflow.js +0 -246
- package/tests/canvas.test.ts +0 -842
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for dollar.ts - $ helper for business operations
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { describe, it, expect, beforeEach } from 'vitest'
|
|
6
|
+
import {
|
|
7
|
+
$,
|
|
8
|
+
createBusinessOperations,
|
|
9
|
+
updateContext,
|
|
10
|
+
getContext,
|
|
11
|
+
resetContext,
|
|
12
|
+
} from '../src/dollar.js'
|
|
13
|
+
|
|
14
|
+
describe('Dollar ($) Helper', () => {
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
resetContext()
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
describe('createBusinessOperations()', () => {
|
|
20
|
+
it('should create operations with default context', () => {
|
|
21
|
+
const ops = createBusinessOperations()
|
|
22
|
+
|
|
23
|
+
expect(ops.context).toEqual({})
|
|
24
|
+
expect(typeof ops.format).toBe('function')
|
|
25
|
+
expect(typeof ops.percent).toBe('function')
|
|
26
|
+
expect(typeof ops.growth).toBe('function')
|
|
27
|
+
expect(typeof ops.margin).toBe('function')
|
|
28
|
+
expect(typeof ops.roi).toBe('function')
|
|
29
|
+
expect(typeof ops.ltv).toBe('function')
|
|
30
|
+
expect(typeof ops.cac).toBe('function')
|
|
31
|
+
expect(typeof ops.burnRate).toBe('function')
|
|
32
|
+
expect(typeof ops.runway).toBe('function')
|
|
33
|
+
expect(typeof ops.log).toBe('function')
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('should create operations with initial context', () => {
|
|
37
|
+
const ops = createBusinessOperations({
|
|
38
|
+
business: { name: 'Test Corp' },
|
|
39
|
+
financials: { revenue: 100000 },
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
expect(ops.context.business?.name).toBe('Test Corp')
|
|
43
|
+
expect(ops.context.financials?.revenue).toBe(100000)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
describe('$.format()', () => {
|
|
48
|
+
it('should format currency with default USD', () => {
|
|
49
|
+
const formatted = $.format(1234.56)
|
|
50
|
+
expect(formatted).toContain('1,234.56')
|
|
51
|
+
expect(formatted).toContain('$')
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('should format currency with specified currency', () => {
|
|
55
|
+
const formatted = $.format(1000, 'EUR')
|
|
56
|
+
expect(formatted).toContain('1,000')
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
it('should format negative amounts', () => {
|
|
60
|
+
const formatted = $.format(-500)
|
|
61
|
+
expect(formatted).toContain('-')
|
|
62
|
+
expect(formatted).toContain('500')
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('should handle zero amount', () => {
|
|
66
|
+
const formatted = $.format(0)
|
|
67
|
+
expect(formatted).toContain('0')
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it('should handle large numbers', () => {
|
|
71
|
+
const formatted = $.format(1000000000)
|
|
72
|
+
expect(formatted).toContain('1,000,000,000')
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
describe('$.percent()', () => {
|
|
77
|
+
it('should calculate percentage', () => {
|
|
78
|
+
expect($.percent(25, 100)).toBe(25)
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it('should handle zero total', () => {
|
|
82
|
+
expect($.percent(25, 0)).toBe(0)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it('should handle over 100%', () => {
|
|
86
|
+
expect($.percent(150, 100)).toBe(150)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
it('should handle decimal values', () => {
|
|
90
|
+
expect($.percent(33, 100)).toBe(33)
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
it('should handle zero value', () => {
|
|
94
|
+
expect($.percent(0, 100)).toBe(0)
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
describe('$.growth()', () => {
|
|
99
|
+
it('should calculate growth rate', () => {
|
|
100
|
+
expect($.growth(120, 100)).toBe(20)
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it('should calculate negative growth', () => {
|
|
104
|
+
expect($.growth(80, 100)).toBe(-20)
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
it('should handle zero previous value', () => {
|
|
108
|
+
expect($.growth(100, 0)).toBe(0)
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
it('should handle same values (no growth)', () => {
|
|
112
|
+
expect($.growth(100, 100)).toBe(0)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
it('should handle doubling', () => {
|
|
116
|
+
expect($.growth(200, 100)).toBe(100)
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
describe('$.margin()', () => {
|
|
121
|
+
it('should calculate margin', () => {
|
|
122
|
+
expect($.margin(100, 60)).toBe(40)
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
it('should handle zero revenue', () => {
|
|
126
|
+
expect($.margin(0, 0)).toBe(0)
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
it('should handle 100% margin', () => {
|
|
130
|
+
expect($.margin(100, 0)).toBe(100)
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
it('should handle negative margin', () => {
|
|
134
|
+
expect($.margin(100, 150)).toBe(-50)
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
describe('$.roi()', () => {
|
|
139
|
+
it('should calculate ROI', () => {
|
|
140
|
+
expect($.roi(150, 100)).toBe(50)
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
it('should calculate negative ROI', () => {
|
|
144
|
+
expect($.roi(80, 100)).toBe(-20)
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
it('should handle zero cost', () => {
|
|
148
|
+
expect($.roi(150, 0)).toBe(0)
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
it('should handle 100% ROI', () => {
|
|
152
|
+
expect($.roi(200, 100)).toBe(100)
|
|
153
|
+
})
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
describe('$.ltv()', () => {
|
|
157
|
+
it('should calculate lifetime value', () => {
|
|
158
|
+
expect($.ltv(100, 12, 2)).toBe(2400)
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
it('should handle monthly subscription', () => {
|
|
162
|
+
// $50/month, 12 months/year, 3 year lifetime
|
|
163
|
+
expect($.ltv(50, 12, 3)).toBe(1800)
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
it('should handle zero values', () => {
|
|
167
|
+
expect($.ltv(0, 12, 2)).toBe(0)
|
|
168
|
+
expect($.ltv(100, 0, 2)).toBe(0)
|
|
169
|
+
expect($.ltv(100, 12, 0)).toBe(0)
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
describe('$.cac()', () => {
|
|
174
|
+
it('should calculate customer acquisition cost', () => {
|
|
175
|
+
expect($.cac(10000, 100)).toBe(100)
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it('should handle zero customers', () => {
|
|
179
|
+
expect($.cac(10000, 0)).toBe(0)
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
it('should handle zero spend', () => {
|
|
183
|
+
expect($.cac(0, 100)).toBe(0)
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
describe('$.burnRate()', () => {
|
|
188
|
+
it('should calculate monthly burn rate', () => {
|
|
189
|
+
expect($.burnRate(100000, 70000, 3)).toBe(10000)
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
it('should handle zero months', () => {
|
|
193
|
+
expect($.burnRate(100000, 70000, 0)).toBe(0)
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
it('should handle positive cash flow', () => {
|
|
197
|
+
// If ending > starting, burn is negative (accumulating cash)
|
|
198
|
+
expect($.burnRate(100000, 130000, 3)).toBe(-10000)
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
describe('$.runway()', () => {
|
|
203
|
+
it('should calculate runway in months', () => {
|
|
204
|
+
expect($.runway(100000, 10000)).toBe(10)
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
it('should handle zero burn rate', () => {
|
|
208
|
+
expect($.runway(100000, 0)).toBe(Infinity)
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
it('should handle negative burn rate (profitable)', () => {
|
|
212
|
+
expect($.runway(100000, -10000)).toBe(Infinity)
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
it('should handle large runway', () => {
|
|
216
|
+
expect($.runway(1000000, 1000)).toBe(1000)
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
describe('Context Management', () => {
|
|
221
|
+
it('should update context', () => {
|
|
222
|
+
updateContext({ business: { name: 'Updated Corp' } })
|
|
223
|
+
const ctx = getContext()
|
|
224
|
+
expect(ctx.business?.name).toBe('Updated Corp')
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
it('should merge context updates', () => {
|
|
228
|
+
updateContext({ business: { name: 'Test Corp' } })
|
|
229
|
+
updateContext({ financials: { revenue: 100000 } })
|
|
230
|
+
|
|
231
|
+
const ctx = getContext()
|
|
232
|
+
expect(ctx.business?.name).toBe('Test Corp')
|
|
233
|
+
expect(ctx.financials?.revenue).toBe(100000)
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
it('should reset context', () => {
|
|
237
|
+
updateContext({ business: { name: 'Test Corp' } })
|
|
238
|
+
resetContext()
|
|
239
|
+
|
|
240
|
+
const ctx = getContext()
|
|
241
|
+
expect(ctx).toEqual({})
|
|
242
|
+
})
|
|
243
|
+
|
|
244
|
+
it('should get current context', () => {
|
|
245
|
+
updateContext({ customField: 'custom value' })
|
|
246
|
+
const ctx = getContext()
|
|
247
|
+
expect(ctx.customField).toBe('custom value')
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
|
|
251
|
+
describe('Default $ instance', () => {
|
|
252
|
+
it('should have all operations available', () => {
|
|
253
|
+
expect(typeof $.format).toBe('function')
|
|
254
|
+
expect(typeof $.percent).toBe('function')
|
|
255
|
+
expect(typeof $.growth).toBe('function')
|
|
256
|
+
expect(typeof $.margin).toBe('function')
|
|
257
|
+
expect(typeof $.roi).toBe('function')
|
|
258
|
+
expect(typeof $.ltv).toBe('function')
|
|
259
|
+
expect(typeof $.cac).toBe('function')
|
|
260
|
+
expect(typeof $.burnRate).toBe('function')
|
|
261
|
+
expect(typeof $.runway).toBe('function')
|
|
262
|
+
expect(typeof $.log).toBe('function')
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
it('should have context object', () => {
|
|
266
|
+
expect($.context).toBeDefined()
|
|
267
|
+
expect(typeof $.context).toBe('object')
|
|
268
|
+
})
|
|
269
|
+
})
|
|
270
|
+
})
|