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.

1.2 KB
Raw Blame
import { describe, expect, it } from 'vite-plus/test'
import { buildInstalledAppPath, buildLegacyInstalledAppPath, isInstalledAppPath } from '../routes'

describe('installed app routes', () => {
  it('builds the canonical and legacy installed app paths', () => {
    expect(buildInstalledAppPath('installed-1')).toBe('/installed/installed-1')
    expect(buildLegacyInstalledAppPath('installed-1')).toBe('/explore/installed/installed-1')
  })

  it('matches canonical and legacy installed app routes', () => {
    expect(isInstalledAppPath('/installed/installed-1')).toBe(true)
    expect(isInstalledAppPath('/installed/installed-1/chat')).toBe(true)
    expect(isInstalledAppPath('/explore/installed/installed-1')).toBe(true)
    expect(isInstalledAppPath('/explore/installed/installed-1/chat')).toBe(true)
    expect(isInstalledAppPath('/explore/apps')).toBe(false)
  })

  it('can match a specific installed app id', () => {
    expect(isInstalledAppPath('/installed/installed-1', 'installed-1')).toBe(true)
    expect(isInstalledAppPath('/explore/installed/installed-1', 'installed-1')).toBe(true)
    expect(isInstalledAppPath('/installed/installed-2', 'installed-1')).toBe(false)
  })
})