Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

668 B
Raw Blame
import { expectLogic } from 'kea-test-utils'

import { initKeaTests } from '~/test/init'

import { conversationsWidgetSavedViewsLogic } from './conversationsWidgetSavedViewsLogic'

describe('conversationsWidgetSavedViewsLogic', () => {
    beforeEach(() => {
        initKeaTests()
    })

    it('caches an empty saved-view result for the project', async () => {
        const logic = conversationsWidgetSavedViewsLogic({ projectId: 2 })
        logic.mount()

        await expectLogic(logic, () => logic.actions.loadSavedViewsSuccess([])).toMatchValues({
            savedViews: [],
            savedViewsLoaded: true,
        })

        logic.unmount()
    })
})