Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

680 B
Raw Blame
const flags = vi.hoisted(() => ({ hitlIm: false, preview: true }))

vi.mock('@/config', () => ({
  get ENABLE_HITL_IM() {
    return flags.hitlIm
  },
  get ENABLE_FEATURE_PREVIEW() {
    return flags.preview
  },
}))

describe('Contacts management release gate', () => {
  it.each([
    [false, false],
    [false, true],
    [true, false],
    [true, true],
  ])(
    'uses the dedicated gate (%s) independently of feature preview (%s)',
    async (hitlIm, preview) => {
      flags.hitlIm = hitlIm
      flags.preview = preview
      const { isContactsManagementEnabled } = await import('../feature-flag')
      expect(isContactsManagementEnabled()).toBe(hitlIm)
    },
  )
})