rename isSubscribed and dont import cloud on local

This commit is contained in:
bymyself
2025-12-02 22:54:49 -08:00
parent 10288ee239
commit 9d889198f8
16 changed files with 66 additions and 48 deletions

View File

@@ -92,7 +92,7 @@ describe('useSubscription', () => {
})
describe('computed properties', () => {
it('should compute isActiveSubscription correctly when subscription is active', async () => {
it('should compute isSubscribedOrIsNotCloud 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 { isActiveSubscription, fetchStatus } = useSubscription()
const { isSubscribedOrIsNotCloud, fetchStatus } = useSubscription()
await fetchStatus()
expect(isActiveSubscription.value).toBe(true)
expect(isSubscribedOrIsNotCloud.value).toBe(true)
})
it('should compute isActiveSubscription as false when subscription is inactive', async () => {
it('should compute isSubscribedOrIsNotCloud 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 { isActiveSubscription, fetchStatus } = useSubscription()
const { isSubscribedOrIsNotCloud, fetchStatus } = useSubscription()
await fetchStatus()
expect(isActiveSubscription.value).toBe(false)
expect(isSubscribedOrIsNotCloud.value).toBe(false)
})
it('should format renewal date correctly', async () => {