dify/web/features/agent-v2/__tests__/feature-flag.spec.ts
盐粒 Yanli 3f2d22ec0f
feat(agent-v2): sync nightly updates to main (#37599)
Co-authored-by: Jingyi-Dify <jingyi.qi@dify.ai>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Bond Zhu <783504079@qq.com>
Co-authored-by: Yansong Zhang <916125788@qq.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-06-18 05:03:34 +00:00

19 lines
431 B
TypeScript

describe('Agent v2 feature flags', () => {
beforeEach(() => {
vi.clearAllMocks()
vi.resetModules()
})
it('reads the client-visible Agent v2 flag from NEXT_PUBLIC_ENABLE_AGENT_V2', async () => {
vi.doMock('@/env', () => ({
env: {
NEXT_PUBLIC_ENABLE_AGENT_V2: true,
},
}))
const { isAgentV2Enabled } = await import('../feature-flag')
expect(isAgentV2Enabled()).toBe(true)
})
})