feat: the frontend part of mcp (#22131)

Co-authored-by: jZonG <jzongcode@gmail.com>
Co-authored-by: Novice <novice12185727@gmail.com>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com>
This commit is contained in:
Joel
2025-07-10 14:14:02 +08:00
committed by GitHub
parent 535fff62f3
commit 5375d9bb27
152 changed files with 6340 additions and 695 deletions

View File

@@ -0,0 +1,26 @@
import { isSupportMCP } from './plugin-version-feature'
describe('plugin-version-feature', () => {
beforeEach(() => {
jest.clearAllMocks()
})
describe('isSupportMCP', () => {
it('should call isEqualOrLaterThanVersion with the correct parameters', () => {
expect(isSupportMCP('0.0.3')).toBe(true)
expect(isSupportMCP('1.0.0')).toBe(true)
})
it('should return true when version is equal to the supported MCP version', () => {
const mockVersion = '0.0.2'
const result = isSupportMCP(mockVersion)
expect(result).toBe(true)
})
it('should return false when version is less than the supported MCP version', () => {
const mockVersion = '0.0.1'
const result = isSupportMCP(mockVersion)
expect(result).toBe(false)
})
})
})