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.

606 B
Raw Blame
import { beforeEach, describe, expect, it, vi } from 'vite-plus/test'
import { createHttpClientWithSpies } from '../../tests/test-utils'
import { WorkspaceClient } from './workspace'

describe('WorkspaceClient', () => {
  beforeEach(() => {
    vi.restoreAllMocks()
  })

  it('gets models by type', async () => {
    const { client, request } = createHttpClientWithSpies()
    const workspace = new WorkspaceClient(client)

    await workspace.getModelsByType('llm')

    expect(request).toHaveBeenCalledWith({
      method: 'GET',
      path: '/workspaces/current/models/model-types/llm',
    })
  })
})