don't use compound name, use isSubscriptionRequirementMet

This commit is contained in:
bymyself
2025-12-05 18:06:07 -08:00
parent cd15c2706d
commit 5fd6aa69b8
17 changed files with 62 additions and 54 deletions

View File

@@ -92,7 +92,7 @@ describe('useSubscription', () => {
})
describe('computed properties', () => {
it('should compute isSubscribedOrIsNotCloud correctly when subscription is active', async () => {
it('should compute isSubscriptionRequirementMet correctly when subscription is active', async () => {
vi.mocked(global.fetch).mockResolvedValue({
ok: true,
json: async () => ({
@@ -103,13 +103,13 @@ describe('useSubscription', () => {
} as Response)
mockIsLoggedIn.value = true
const { isSubscribedOrIsNotCloud, fetchStatus } = useSubscription()
const { isSubscriptionRequirementMet, fetchStatus } = useSubscription()
await fetchStatus()
expect(isSubscribedOrIsNotCloud.value).toBe(true)
expect(isSubscriptionRequirementMet.value).toBe(true)
})
it('should compute isSubscribedOrIsNotCloud as false when subscription is inactive', async () => {
it('should compute isSubscriptionRequirementMet as false when subscription is inactive', async () => {
vi.mocked(global.fetch).mockResolvedValue({
ok: true,
json: async () => ({
@@ -120,10 +120,10 @@ describe('useSubscription', () => {
} as Response)
mockIsLoggedIn.value = true
const { isSubscribedOrIsNotCloud, fetchStatus } = useSubscription()
const { isSubscriptionRequirementMet, fetchStatus } = useSubscription()
await fetchStatus()
expect(isSubscribedOrIsNotCloud.value).toBe(false)
expect(isSubscriptionRequirementMet.value).toBe(false)
})
it('should format renewal date correctly', async () => {