(stats: {
currentPeriodCost: string | number | null
proPeriodCostSnapshot: string | number | null
proPeriodCostSnapshotAt: Date | null
lastPeriodCost: string | number | null
})
| 559 | } |
| 560 | |
| 561 | function personalUsageSnapshotFromStats(stats: { |
| 562 | currentPeriodCost: string | number | null |
| 563 | proPeriodCostSnapshot: string | number | null |
| 564 | proPeriodCostSnapshotAt: Date | null |
| 565 | lastPeriodCost: string | number | null |
| 566 | }): PersonalUsageSnapshot { |
| 567 | return { |
| 568 | currentPeriodCost: toNumber(toDecimal(stats.currentPeriodCost)), |
| 569 | proPeriodCostSnapshot: toNumber(toDecimal(stats.proPeriodCostSnapshot)), |
| 570 | proPeriodCostSnapshotAt: stats.proPeriodCostSnapshotAt, |
| 571 | lastPeriodCost: toNumber(toDecimal(stats.lastPeriodCost)), |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | function personalUsageSnapshotMatches( |
| 576 | expected: PersonalUsageSnapshot, |
no test coverage detected