dify/sdks/nodejs-client/src/client/workspace.test.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

22 lines
598 B
TypeScript

import { beforeEach, describe, expect, it, vi } from 'vitest'
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',
})
})
})