Files
dify/web/app/components/plugins/__tests__/constants.spec.ts
Coding On Star 9948a51b14 test: add unit tests for access control components to enhance coverage and reliability (#34722)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 08:50:57 +00:00

41 lines
919 B
TypeScript

import { describe, expect, it } from 'vitest'
import { categoryKeys, tagKeys } from '../constants'
import { PluginCategoryEnum } from '../types'
describe('plugin constants', () => {
it('exposes the expected plugin tag keys', () => {
expect(tagKeys).toEqual([
'agent',
'rag',
'search',
'image',
'videos',
'weather',
'finance',
'design',
'travel',
'social',
'news',
'medical',
'productivity',
'education',
'business',
'entertainment',
'utilities',
'other',
])
})
it('exposes the expected category keys in display order', () => {
expect(categoryKeys).toEqual([
PluginCategoryEnum.model,
PluginCategoryEnum.tool,
PluginCategoryEnum.datasource,
PluginCategoryEnum.agent,
PluginCategoryEnum.extension,
'bundle',
PluginCategoryEnum.trigger,
])
})
})